| ▲ | UI_at_80x24 7 hours ago |
| I've been a fan of all rust-based utilities that I've used. I am worried that 20+ (??) years of bug fixes and edge-case improvements can't be accounted for by simply using a newer/better code-base. A lot of bug fixes/exploits are _CAUSED_ by the C+ core, but still... Tried & true vs new hotness? |
|
| ▲ | giancarlostoro 7 hours ago | parent | next [-] |
| Don't hate me for this, but... is 20 years of Rust really new? https://en.wikipedia.org/wiki/Rust_(programming_language) I do get what you mean, but Rust has been baking for a decade, finally took off after 10 years of baking, and now that is been repeatedly tried and tested it is eating the world, as some developers suggested it could eventually do so. I however do think this shows a different problem: If nobody writes unit tests, how do you write them when you port over projects to ensure your new language doesn't introduce regressions. All rewrites should be preceded by strong useful unit tests. |
| |
| ▲ | UI_at_80x24 6 hours ago | parent | next [-] | | But the 90s was only 20-years ago! lol, you got me.
Stupid old brain not calculating time correctly. | | |
| ▲ | giancarlostoro 5 hours ago | parent [-] | | I was born in 1990 so I get it! I still say 21 when people ask me how old I am... Aka how old do I need to say I am to be able to drink alcohol LOL I don't drink that often mind you. I just don't really think about my age a whole lot... |
| |
| ▲ | 9rx 7 hours ago | parent | prev | next [-] | | Ideally, but if a project wasn't written with tests at the time then finding a working time machine can be a challenge. If you try to add them later you won't capture all the nuance that went into the original program. After all, if the implementation code was expressive enough to capture that nuance, you'd already have your test suite, so to speak. Tests are written to fill in the details that the rest of the code isn't able to express. | |
| ▲ | throw384748 7 hours ago | parent | prev [-] | | Rust does not even have a specification, and stable release yet! You are lucky if current version, compiles two years old code! Rust will be "repeatedly tried and tested" maybe in year 2040! | | |
| ▲ | Iridescent_ 6 hours ago | parent | next [-] | | Rust has editions for strong stability guarantees, and has had them for nearly a decade i believe. Besides, tech backing has grown way past the risky point. | | |
| ▲ | umanwizard 6 hours ago | parent [-] | | FWIW, the GP comment's claim that you're lucky if you can compile 2-year-old code is exaggerated, but so is yours. Rust does not offer "strong stability guarantees". Adding a new method to a standard type or trait can break method inference, and the Rust standard library does that all the time. In C or C++, this isn't supposed to happen: a conformant implementation claiming to support e.g. C++17 would use ifdefs to gate off new C++20 library functions when compiling in C++17 mode. | | |
| ▲ | throwaway27448 6 hours ago | parent | next [-] | | > and the Rust standard library does that all the time. I don't doubt this is true, but do you have an example? I think I haven't run into a build breaking like this in std in like maybe seven/eight years. In my experience breaking changes/experimental apis are typically ensconced in features or gated by editions. Granted, it'd be nice to be able to enforce abi stability at the crate level, but managing that is its own can of worms. I did find that the breakage rfc allows for breaking inference, which tbh seems quite reasonable... inference is opt-in. | | |
| ▲ | umanwizard 5 hours ago | parent [-] | | Almost every major release of rust stabilizes new library methods. For example, the latest major release (1.93) stabilized Vec::into_raw_parts. This isn’t gated by an edition. So if you had a trait with a method “into_raw_parts” which you had defined on Vec, after updating to 1.93 or later your code will either fail to compile, or start running different code when that method is called. Sorry, I meant to write “method resolution”, not inference. This isn’t the same issue as type inference (though indeed, stdlib changes can break that too) |
| |
| ▲ | ChadNauseam 6 hours ago | parent | prev [-] | | Adding a new method can change the behavior of C++ code as well due to templates. Does the standard library never add new methods because of that? | | |
| ▲ | jjmarr 6 hours ago | parent | next [-] | | Yes. All the time. Subscribe to the std-proposals mailing list and you'll see so many obvious improvements get rejected due to ABI compat guarantees. | |
| ▲ | umanwizard 5 hours ago | parent | prev [-] | | > Adding a new method can change the behavior of C++ code as well due to templates. Yes, but the code can be gated off with ifdefs to only be present when compiling for a particular version of the standard. |
|
|
| |
| ▲ | umanwizard 6 hours ago | parent | prev [-] | | > Rust does not even have a specification Neither do most programming languages. > You are lucky if current version, compiles two years old code! That's not true. | | |
| ▲ | giancarlostoro 5 hours ago | parent | next [-] | | > Neither do most programming languages. My favorite nemesis and friend JavaScript does, which always gives me a laugh. Such a mess of a wonderful language. | | |
| ▲ | aapoalas 3 hours ago | parent [-] | | You and me both; never change you beautiful bastard of a language <3 |
| |
| ▲ | Wobbles42 6 hours ago | parent | prev [-] | | > Neither do most programming languages. Rust is trying to replace C++ and C in particular. Those languages have specifications. |
|
|
|
|
| ▲ | mamcx 6 hours ago | parent | prev | next [-] |
| > years of bug fixes and edge-case improvements can't be accounted for by simply using a newer/better code-base. Partially is in fact true: Just because the Rust use a better type system (after ML) + better resource model (aka borrow checker), and if you are decently good, you eliminate, forever!, tons of problems. It can't solve things that arise by complex interactions or just lack of port subtle details like in parsing poor inputs (like html) but is true that changing the language in fact solve tons of things. |
|
| ▲ | petcat 7 hours ago | parent | prev | next [-] |
| Is Rust still considered "new hotness"? I feel like the industry has long-since moved past that perceived "blocker". It seems like Rust is now just the default in all manner of critical systems. |
| |
|
| ▲ | bbkane 7 hours ago | parent | prev [-] |
| I think it's worth trying! |
| |
| ▲ | UI_at_80x24 7 hours ago | parent [-] | | It absolutely is worth trying. I look forward to it being battle tested and proven. I just don't want to be the one doing the testing. rg, fzf, and several others that I can't think have proven to me that rust is the direction going forward. |
|