3 ms·
> but I see no real need for an LTS release What makes Rust special over other programming languages and operating systems and software systems that have LTS r
by bmitc 2y ago
> but I see no real need for an LTS release
What makes Rust special over other programming languages and operating systems and software systems that have LTS releases? For example, .NET and Ubuntu have LTS releases.
- AlotOfReading 2y agoC++ is the most direct comparison. Neither GCC nor Clang have LTS releases. MSVC does via Visual Studio, but I've never seen anyone list it as a benefit vs the other two. What advantage does LTS have for compiler toolchains if no one seems to want it?
- pjmlp 2y agoThey kind of do, that is why you get GCC 10 when GCC 15 is around the corner. ABI stability for one.
- plorkyeran 2y ago.NET and Ubuntu are notably not programming languages. C# does not have LTS releases. LTS releases are for things which end up in your runtime environment. Compilers typically don't have LTS releases because there isn't much room for critical bugs which aren't discovered for a long time. Rustc (as with most AOT compilers) does not attempt to be safe to use on untrusted source code, so a bug when it's given a malicious file isn't a security vulnerability. It's theoretically possible for rustc to have a codegen bug which causes security problems in the code which it compiles, but in practice such things don't really happen and there's nothing unsafe about using a ten or twenty-year-old build of a compiler. LTS releases of the rust standard library could potentially need to become a thing. That could have bugs which need to be backported to old versions, and I assume it just hasn't really come up yet.
- pjmlp 2y agoYes it does, C#, F#, VB, C++/CLI versions are tied to specific .NET versions. Not only do they depend on CLR changes, they also depend on the BCL that is shipped alongside.
- miki123211 2y agoThat, and then there's the fact that due to editions, modern Rust compilers can still compile older Rust code, which isn't always the case for other languages. There's Python 3.10 code out there that won't run under 3.13, especially so if it relies on components written in C that use Python's C API. If you didn't have LTS releases for Python, you'd have a choice between constantly having to port your code to run under the latest Python version or using an older, insecure one. Rust doesn't have this problem, old Rust code should compile just fine under newer versions of the compiler and stdlib.
- pjmlp 2y agoEditions sales pitch never mention the fact that only applies to small grammar changes, your code will break if there are library or semantic changes across editions.
- tialaramex 2y agoYes and no. Yes obviously this just works for "small" grammar changes such as introducing new keywords without fear (which is why Rust's async is called async, not "co_async") and doesn't need awkward keyword reuse like "requires requires" and "class enum". But it enables far more. Lets take an existing edition first, in Rust 2021 Edition (what you get today out of the box when you just start writing Rust) the array types impl IntoIterator. Which makes sense, why shouldn't I iterate over this array with a for loop ? But, Rust 1.0 could not possibly have provided this, how would it work? It didn't in Rust 1.0 you can't make an array into an Iterator. Now, if this was some obscure rarely used feature maybe you'd just say "Who cares" but this is IntoIterator which is used to make for loops work, so that's high profile. So in fact what happens is that a modern Rust compiler (in which there even is a 2021 edition) knows that in earlier Editions it should pretend that arrays did not impl IntoIterator. You can loop over them just fine, but mysteriously they don't impl IntoIterator, so that code which used to mean one thing (because they didn't implement this) still means what it used to. So that's an example of seamlessly making Rust 2021 edition have better semantics and yet all the old software still works. In 2024 edition the semantics of certain RPITs (Return Position Impl Trait, an existential type) with respect to lifetimes are expected to change. In most cases either what you wrote already is technically wrong but will now be correct, or, what you wrote was wrong but you got away with it and now you'll get told you got it wrong if you move editions. Editions is not a panacea but it's vastly better than the previous status quo, look at how miserable the situation is in Java, in C++, in Python. Vastly different approaches, worse results on all dimensions.
- bmitc 2y ago> .NET and Ubuntu are notably not programming languages. C# does not have LTS releases. As someone else already pointed out, this is incorrect. Installing the .NET SDK is how you install C# and F#, and both the C# and F# language versions are tied to .NET versions. Since .NET has LTS releases, so do C# and F#. My original comment already addressed why I mentioned Ubuntu. I didn't claim it was a programming language, and it doesn't matter that it isn't. In fact, that was the point of mentioning it. > Compilers typically don't have LTS releases because there isn't much room for critical bugs which aren't discovered for a long time. Having an LTS release doesn't mean that it doesn't get any bug or security fixes. It normally just means that it doesn't get new features.