from Hacker News

The Fundamental Problem in Python 3

by psibi on 12/20/19, 5:38 AM with 48 comments

  • by mikl on 12/20/19, 7:21 AM

    "Python does not cater to my favourite edge case" != fundamental problem

    In the days before UTF-8-everywhere, file names with anything besides alphanumerics and safe symbols like dashes or underscores were always a problem. If you had special characters in your filenames, you were almost certain to run in to problems, since their meaning varied greatly depending on how the system was set up - codepages and whatnot.

    But this is only a problem if you have such files, and unless you’ve kept files around for decades, you don’t. So young programmers can grow up never having problems with this. Everything will be UTF-8 and it’ll just work.

    And as for broken old file names, who cares? Fix your file names and move on. There’s no reason that Python 3 should have workarounds for problems that were solved over a decade ago.

  • by oefrha on 12/20/19, 6:23 AM

    Just a rehash of

    https://changelog.complete.org/archives/10053-the-incredible...

    https://news.ycombinator.com/item?id=21606416

    Arguing that python3’s str model doesn’t work well with POSIX’s “any bag of bytes can be a filename” model. Plus new rants about surrogateescape which the author has learned since publishing the last article.

    The author sure has a penchant for flamebait titles.

  • by adrian17 on 12/20/19, 6:31 AM

    "into what is fundamentally a weakly-typed, dynamic language."

    Nit: isn't Python generally considered to be strongly, dynamically typed?

  • by kresten on 12/20/19, 6:22 AM

    It takes a specific type of personality to remain angry about Python 3 in Dec 2019.

    Didn’t that story finish?

  • by xapata on 12/20/19, 6:47 AM

    Use pathlib?
  • by smitty1e on 12/20/19, 9:29 AM

    The lack of any Pathlib discussion seemed curious.
  • by kthejoker2 on 12/20/19, 5:33 PM

    > This was the most common objection raised to my prior post. “Get over it, the world’s moved on.”

    Gee I wonder why ...

  • by goatinaboat on 12/20/19, 7:22 AM

    The truth is that 99% of programmers can do everything they need to in ASCII and the other 1% are working on tools to handle Unicode itself. It’s a mistake and as soon as it goes the way of the <blink> tag the better. At least that tag was amusing for a short while...