3 ms·
> it’s getting rewrote in Go or Rust, not Python again. Have you ever tried to recompile 1 yr old code in Rust with the latest compiler?
by raverbashing 3y ago
> it’s getting rewrote in Go or Rust, not Python again.
Have you ever tried to recompile 1 yr old code in Rust with the latest compiler?
- orwin 3y agoWhy wouldn't you tag your 1 year old code with the compiler it was written for? And same question for grandparents. I'm not a great dev, average at best, but at least I control my systems.
- stonogo 3y agoIf that's what best practices are for these languages, I now better understand my collegues who will not move away from C/C++. Having to identify a specific compiler version for each bit of code sounds like a nightmare.
- zkldi 3y agoit's very easy. you make a file called `rust-toolchain` next to your `Cargo.toml` that contains the version of rust you intend this to compile for. It will then compile for that version.
- bamfly 3y agoC and C++ projects of any notably complexity & size often suffer from those exact same kind of "library or build tool or compiler updated—now the project won't build" problems. Absent some pretty heroic & unusual levels of discipline from all involved, anyway (which is also a way to avoid those issues in most other languages that have them). [EDIT] Check out issue trackers for such projects, some time. "Build broke due to [thing] being too new" is a routine issue to encounter.
- gkbrk 3y agoWhy should you need to? Just use a stable language, or a language that has a standard or a specification.
- chlorion 3y agoRust is a stable language. Stable features will never be removed or broken. If you don't use unstable features, and aren't relying on something that is unsound, your code will continue to compile. If it doesn't, this is considered a bug and should be reported. This isn't just a hollow promise either, they run tests against most of the crates on crates.io when making changes to the language to ensure that old code is not accidentally broken. Claiming that rust isn't a stable language is pure misinformation, but sadly not uncommon. It's also worth noting that some of the language is specified informally, this is the "reference", there are also RFCs for new features that describe exactly how the feature is intended to work. This isn't a complete formal specification, and could use a lot of work, but I don't think a formal specification with a committee is any better than an informal reference, assuming the reference is exhaustive!
- cesarb 3y ago> Have you ever tried to recompile 1 yr old code in Rust with the latest compiler? I have, more than once; it worked perfectly fine. The only time it's broken for me is when the code had unstable nightly-only features, hidden behind a "nightly-only" feature flag, which was rejected by the parser on a newer Rust compiler, even though it would not be compiled due to the feature flag being disabled (even though it wouldn't be compiled, it still had to be parsed; IIRC, it was the change to the inline assembly syntax, and the fix was just to change from "asm" to "llvm_asm").
- raverbashing 3y agoNot my experience, though I think it was more due to libraries (but need to update a library -> needs newer compiler version -> needs to update another library, etc)