5 ms·
> Most languages aren’t infinitely backwards-compatible so unless you want to be running Python 2.7 forever or whatever… This is an important point that I thin
by throwitaway1123 2y ago
> Most languages aren’t infinitely backwards-compatible so unless you want to be running Python 2.7 forever or whatever…
This is an important point that I think gets overlooked quite a bit in these discussions. Web tech is essentially append only — you can add things but it's incredibly difficult for a browser vendor to make a breaking change because no vendor wants to be perceived as the one that "breaks the Web". Even technologies that were never technically standardized like Web SQL end up sticking around for far too long. I'm not sure if many programming language communities would like to be constrained by this and the slow TC39 language proposal process.
- DemocracyFTW2 2y ago> Web tech is essentially append only not if you implement backwards-compatible opt-outs for which see my reply concerning pragmas a la `'use strict'`
- throwitaway1123 2y agoThis is mostly conceptual rather than technical, but I view pragmas like use strict as an append operation. If browsers dropped sloppy mode completely and made strict mode the default for all scripts, then that would be a true delete operation. I wouldn't be surprised if browsers still support sloppy mode cruft like the with operator in 2034.
- DemocracyFTW2 2y ago> I wouldn't be surprised if browsers still support sloppy mode cruft like the with operator in 2034 And may they do it, I don't care except for the weight of the little-used lines of code that are carried forward indefinitely. And it's not only 'append'; appending stuff we can without breaking backwards compatibility, it's the 'update' operations that curiously many view as infeasible despite there already being `'use strict'`.
- throwitaway1123 2y agoThe problem for me is that you can't ever irrevocably remove a feature from the language, which means you'll end up having to read and interact with code written in the original version if you spend enough time in the language ecosystem. I've seen developers that continue to litter their codebases with `var` in 2024 despite `const` and `let` replacing almost every valid use case for `var`. Server side developers yearn for their favorite language in the browser, but are used to living in a world where language deprecations mean "this feature will disappear from all modern version of the language eventually" not "you can opt-out of this feature by placing a string somewhere in your code". To me that's a hollow definition of 'update'. Golang for example completely changed the semantics of for loops this year [1]. Moving forward, if you use a modern version of Go, you will accept the way for loops work now — there's no magical 'use old for loops' string. It's awesome that they were able to unilaterally make a breaking change to the language and force users to accept it moving forward. We can't do that in JS, that's the point I'm making. [1] https://tip.golang.org/doc/go1.22 https://tip.golang.org/doc/go1.22