News for hackers. Stuff that matters.
Re:Python 3.12.0 is to remove long-deprecated items by whimsicalism on Wednesday November 16, 2022 @02:39PM (#33629313)
I disagree strongly with this take and it seems basically to be saying "better error messages are bad."

What if clang says "did you forget a ';'"? It would have been better to just compile the code as if there was a semicolon?

Re:Python 3.12.0 is to remove long-deprecated items by johnchristopher on Wednesday November 16, 2022 @02:55PM (#33629536)
> I disagree strongly with this take and it seems basically to be saying "better error messages are bad."

I rather have something like this:

> Use exit() or Ctrl-D (i.e. EOF) to exit > >>>

Less pedantic, less passive agressive. Doesn't fake being nice to the user.

Re:Python 3.12.0 is to remove long-deprecated items by sigmoid10 on Wednesday November 16, 2022 @02:56PM (#33629554)
No need to disagree, that's just two different design patterns among programming languages. If stuff like that matters, you can always choose Ruby or something similar. It has its own shortcomings though and neither approach is ideal in every situation. That being said, the transition from Python 2 to 3 was the most horrible thing that ever happened to a popular language. Print for example was fine as a keyword and forcing it into a function after so many years was a terrible retroactive design choice.
Re:Python 3.12.0 is to remove long-deprecated items by ywain on Wednesday November 16, 2022 @03:32PM (#33630102)
Meh, the print change was fairly trivial. You could backport the print function in Python 2 codebases, and updating existing print statements to use the function was easy to automate. String changing from bytes to Unicode was a lot more painful, in my experience.
Re:Python 3.12.0 is to remove long-deprecated items by jbay808 on Wednesday November 16, 2022 @03:57PM (#33630456)
Unfortunately, it also had the effect of breaking language tutorials going all the way up to "hello world". A tough experience for new learners, who are least able to debug those simple errors.

Back when Python 3 was first released, the error message was not so clear, either...

Re:Python 3.12.0 is to remove long-deprecated items by sigmoid10 on Thursday November 17, 2022 @04:40AM (#33636745)
That was just the surface. Even the Python Foundation knew that their 2to3 converter tool just wasn't sufficient and hat to delay the discontinuation of Python 2 for half a decade, because there was so much unportable code out there.
Re:Python 3.12.0 is to remove long-deprecated items by mattgreenrocks on Wednesday November 16, 2022 @02:57PM (#33629576)
Orthodoxy has never been my strong suit.

I have a pragmatic take on this if only because of Python's ease of throwing a script together and its non-technical userbase. Were it something that effects correctness I'd more fully support this break of backwards compat.

Re:Python 3.12.0 is to remove long-deprecated items by akira2501 on Wednesday November 16, 2022 @03:02PM (#33629663)
This is why I appreciate languages with a strict and non-strict mode. Let me make that choice. In particular, if the parser is intelligent enough to understand what I meant and is just throwing a syntax error to be pedantic, then let me control that. Needlessly taking choices away will always be a frustration.
Re:Python 3.12.0 is to remove long-deprecated items by justin_oaks on Wednesday November 16, 2022 @03:34PM (#33630127)
The downsides of having both strict and non-strict mode:

- It is a maintenance burden on the compiler/interpreter writers to allow both modes

- There may be unexpected behavior when you use code from two different sources; one that expects strict mode and the other expects non-strict mode

- There may be interpersonal conflict when developers working together prefer one mode over another