News for hackers. Stuff that matters.
Re:We fixed f-string typos in popular Python repos by HL33tibCe7 on Friday April 29, 2022 @02:47PM (#31209165)
That’s not really a feasible solution in Python because that change would break a load of existing code.
Re:We fixed f-string typos in popular Python repos by mschuster91 on Friday April 29, 2022 @02:57PM (#31209280)
So 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.
Re:We fixed f-string typos in popular Python repos by swatcoder on Friday April 29, 2022 @03:08PM (#31209419)
As 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?

Re:We fixed f-string typos in popular Python repos by mulmen on Friday April 29, 2022 @03:54PM (#31209902)
One person’s “new interesting thing” is another person’s “breaking change”.
Re:We fixed f-string typos in popular Python repos by HL33tibCe7 on Friday April 29, 2022 @03:06PM (#31209395)
We’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.
Re:We fixed f-string typos in popular Python repos by capitalsigma on Friday April 29, 2022 @03:06PM (#31209405)
Just bump the major version number from 3 to 4, right? How long could that migration take?
Re:We fixed f-string typos in popular Python repos by noobermin on Friday April 29, 2022 @03:17PM (#31209530)
We'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.
Re:We fixed f-string typos in popular Python repos by krisoft on Friday April 29, 2022 @03:13PM (#31209482)
> 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?

Re:We fixed f-string typos in popular Python repos by bornfreddy on Friday April 29, 2022 @03:05PM (#31209376)
Also see: Python 2 => 3 hell. Nobody wants to repeat that.
Re:We fixed f-string typos in popular Python repos by fphhotchips on Friday April 29, 2022 @10:58PM (#31212965)
Right?! 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."
Re:We fixed f-string typos in popular Python repos by Too on Saturday April 30, 2022 @12:28AM (#31213342)
Changing 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.

Re:We fixed f-string typos in popular Python repos by rglullis on Friday April 29, 2022 @09:14PM (#31212457)
PHP 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.
Re:We fixed f-string typos in popular Python repos by SquareWheel on Friday April 29, 2022 @09:54PM (#31212665)
That'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.
Re:We fixed f-string typos in popular Python repos by rglullis on Friday April 29, 2022 @10:03PM (#31212713)
It'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.

Re:We fixed f-string typos in popular Python repos by dekhn on Friday April 29, 2022 @03:07PM (#31209412)
Python 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.