Re:Bringing the print statement back
by kevin_thibedeau on Tuesday July 14, 2020 @11:05PM
(#23840758)
Being a statement is less of an issue than the special behavior of the trailing comma, '>>' token, and the inability to augment behavior with named arguments. The lexer shouldn't have to deal with that sort of stuff.
[ Parent
| on HN ]
Backwards compatibility is something that you only ditch for extremely good reasons, for instance to deal with a security issue that can not be handled in any other way. Breaking it for reasons of aesthetics is just plain dumb. The python ecosystem is still suffering from these major mistakes many years later and python's image as a reliable and trustworthy tool suffered right along with it. Such changes are fine pre 1.0, but once you ask people to base their production systems on it you maintain backwards compatibility at a cost, even if that means holding your nose occasionally. And my suggested fix would at least allow for the old syntax to live happily along with the new one, which given the price (two stupid brackets) could have easily been dealt with. Focusing on purity vs the responsibility towards people maintaining 100's of millions of lines of code in aggregate (if not another order of magnitude more) means you don't have your priorities straight.
Imagine we'd drop HTTPS for a new protocol because it fixes the 'Referrer' spelling error.
Re:Bringing the print statement back
by wodenokoto on Wednesday July 15, 2020 @07:40AM
(#23843816)
The analogy here is: "Imagine making a new, incompatible protocol and NOT fixing the 'Referrer' spelling error, because the old protocol had that spelling error"
Python 3 is the version with breaking changes from 2.x and while stuff is being broken, they decided to fix the print statement.
Python 3 wasn't invented to fix the print statement.
The backwards compatibility was already ditched. It's over.
Re:Bringing the print statement back
by moreaccountspls on Wednesday July 15, 2020 @02:07AM
(#23841881)
> The lexer shouldn't have to deal with that sort of stuff.
The problem with that is that the entire python ecosystem had to deal with that instead...
I'm going way past rant territory at this point, but there's a reason that Microsoft and Amazon are worth a trillion dollars a piece, and it's not because of beautiful and elegant APIs.
SO, you're saying that if Python abandoned quality in favour of aggressive sales and marketing in the channel and cut-throat monopolistic practices against competing program languages, then its core programmers would rise to the ranks of American social elites?
Re:Bringing the print statement back
by moreaccountspls on Wednesday July 15, 2020 @01:08PM
(#23848158)
Alright, I'll bite. Why do you think not breaking users programs is abandoning quality?
Re:Bringing the print statement back
by kevin_thibedeau on Wednesday July 15, 2020 @02:40AM
(#23842048)
The whole ecosystem had over ten years to import print_function and fix their shit for the eventual flag day.
Re:Bringing the print statement back
by PhantomGremlin on Wednesday July 15, 2020 @04:39AM
(#23842687)
Python 3 literally broke "hello, world". For some vague notion of aesthetics. Or for some even more obscure "inside baseball" reason that 99% of Python users could care less about.
The following still compiles and runs, on the compiler that comes with the latest OpenBSD:
main()
{
printf("hello, world\n");
}
Somehow the C language has managed to survive and thrive without breaking the canonical example program.It survived and thrived because it did not break the canonical example program. If they had broken printf in say 1995 the situation would be entirely different today. Oh, and they did get it right the first time by making it a function.