Re:Difftastic: A diff that understands syntax
by giraffe_lady on Tuesday March 29, 2022 @10:21PM
(#30850858)
Didn't ruby actually do exactly this though? And it broke a million websites and they changed it back in the next version and have made it explicit ever since? To me that is much stronger evidence than what we think would happen if php did it.
Re:Difftastic: A diff that understands syntax
by vanderZwan on Wednesday March 30, 2022 @06:04AM
(#30853248)
I don't know about Ruby, but one example I can think of where a language made the instability explicit is that early on in the language Go changed the behavior of the select statement:
> If one or more of the communications can proceed, a single one that can proceed is chosen via a uniform pseudo-random selection.
https://go.dev/ref/spec#Select_statements
In an early implementation it would pick in lexical order, IIRC (and the specification did not mention how a communication should be picked). Not only could this lead to bugs, apparently some people were relying on it and they didn't want that.
Language designers need to contend with the fact that the ultimate final say in whether a thing is or not is whether that behavior is observed.