4 ms·
That’s not really a feasible solution in Python because that change would break a load of existing code.
by HL33tibCe7 4y ago
That’s not really a feasible solution in Python because that change would break a load of existing code.
- mschuster91 4y agoSo what? Raise a deprecation notice, treat it as a fatal error in two or three years and that's it. PHP has been doing this for years now.
- bornfreddy 4y agoAlso see: Python 2 => 3 hell. Nobody wants to repeat that.
- fphhotchips 4y agoRight?! Imagine: "We're announcing Python 4. Python 3 was because we handled unicode in a way that turned out to make nearly 0 sense. Python 4 is because you lot can't put your f's in the right place."
- HL33tibCe7 4y agoWe’re not talking about deprecating a feature here, we’re talking about the addition of behaviour that will break existing code, potentially in non-trivial and hard to debug ways, and in ways that could easily introduce security vulnerabilities.
- capitalsigma 4y agoJust bump the major version number from 3 to 4, right? How long could that migration take?
- dekhn 4y agoPython does not do this. A change like that would require a major version number increment and the community would revolt. Too bad we can't go back in time to 1996 or so.
- swatcoder 4y agoAs someone who would like to be working on new, interesting things in 2-3 years rather than bringing old code into conformance with breaking changes, this attitude captures a worrisome trend in development. On the one hand, it's great that we have platforms that innovate and improve and harden over time, but we're also facing a development culture where more and more time is spent servicing package/platform/language/OS changes that have no material impact on our own otherwise-mature projects. It's worth being judicious about where breaking changes are applied, right?
- mulmen 4y agoOne person’s “new interesting thing” is another person’s “breaking change”.
- krisoft 4y ago> treat it as a fatal error Did you think this through? What would you treat as a fatal error? How would the compiler know if a particular string is old style code wanting to print some characters between curly braces or new style code wanting to string interpolate a variable?
- noobermin 4y agoWe've done this too many times and we've had enough pain, let's please proceed at a pace where we can worry about delivering our product and not updating formatted strings, thank you.
- rglullis 4y agoPHP has also been responsible for the majority of exploited servers and misconfigured applications. Whatever they are doing it, I take it as a strong negative signal.
- SquareWheel 4y agoThat's not unreasonable considering that PHP is by far the most popular server-side language. It's not like we have many hackers targeting Erlang instead.
- rglullis 4y agoIt's out of proportion. Take as many Django/Rails/ASP.Net exploited sites that you find and it won't hold a candle to PHP. Also, want to talk Java? Let's not forget that log4j was exploited precisely because of implicit string conversions. Implicit f-strings are a really bad idea.
- Too 4y agoChanging something as deeply rooted as the string type? Python already went through exactly that disaster once before, when they changed the default string type from b””-strings to u””-strings. It took about 20 years for this transition to finally complete.