3 ms·
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 hav
by whimsicalism 4y ago
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?
- johnchristopher 4y ago> 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.
- sigmoid10 4y agoNo 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.
- ywain 4y agoMeh, 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.
- jbay808 4y agoUnfortunately, 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...
- sigmoid10 4y agoThat 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. In the end we had 12 years where the two languages lived side by side and my first job using Python had us use 2.7 for new projects due to library concerns despite 3 being around for more than 7 years already.
- mattgreenrocks 4y agoOrthodoxy 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.
- akira2501 4y agoThis 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.
- justin_oaks 4y agoThe 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