5 ms·
>If a programming language evolves to the point that previous programs written in that language no longer compile then it's no longer the same language. I don'
by Tehnix 6y ago
>If a programming language evolves to the point that previous programs written in that language no longer compile then it's no longer the same language.
I don't really buy that you cannot ever introduce breaking changes. That's a recipe for disaster and IMHO short-sighted.
>In many cases these programs have been running for decades, they work.
And in many other cases, they have been full of security holes that take an incredible amount of work to discover.
Something like Rust's editions seems to solve this problem very well, and is indeed what they are intended for.
You can still compile old code, you just won't have full access to new features if you choose to do so. This provides a way to keep legacy systems alive while providing an upgrade path for them at the same time.
- 0xffff2 6y ago>>If a programming language evolves to the point that previous programs written in that language no longer compile then it's no longer the same language. >I don't really buy that you cannot ever introduce breaking changes. That's a recipe for disaster and IMHO short-sighted. It's also empirically true in my experience. See Python2/Python3, Perl/Raku, C++98/C++11/C++20. In the latter case, I'm not even sure there are any significant breaking changes, but the feature sets are so different that I find that I pretty much always have to specify which version of C++ I'm talking about.
- guenthert 6y agoWell, C hasn't been designed to be evolving and was also quite under-specified through most of its history; a hacker's delight, a tool to get things done, quick, but not a receipt for long-term maintainability. Given that, I'd think C did rather well.