5 ms·
I think Rust's merits are real but mostly those of OCaml or Haskell which have been around for decades. I'm glad to see an ML-family language finally having a c
by lmm 10y ago
I think Rust's merits are real but mostly those of OCaml or Haskell which have been around for decades. I'm glad to see an ML-family language finally having a cultural moment - it's a bit unfortunate that it comes with manual memory management that 99% of programmers don't need, but it's still a great thing.
Rust is also giving the - to put it bluntly - idiots - who insist their application has to be written C or C++ "because it's fast" a better language without having to overcome that idiocy. I'm not sure if that's a good or a bad thing - it's beneficial in the short term, but letting idiotic attitudes towards performance persist seems like storing up trouble for the future.
For the people who genuinely need manual memory management Rust is a major breakthrough. But those people are such a tiny niche as to not be worth worrying about. People who claim to need manual memory management are overwhelmingly likely to be in the previous category.
- gcp 10y agoBut those people are such a tiny niche as to not be worth worrying about. I don't disagree with your assessment, but one reason why there's enthusiasm for Rust is that this niche hasn't had any real alternatives (save maybe D?) for years.
- TuringTest 10y agoI agree. In particular because that tiny niche is the one that builds the core infrastructure where every other userspace platform runs :-)
- TuringTest 10y ago> it's a bit unfortunate that it comes with manual memory management that 99% of programmers don't need For what I've seen, that's actually the #1 feature of Rust. A programmer who wants to use a ML-like language that doesn't need that feature should instead be using Haskell or F#; Rust is designed for systems-level programming, where being able to control every cycle of the processor is important. For that, you need manual memory management.
- fnord123 10y ago>A programmer who wants to use a ML-like language that doesn't need that feature should instead be using Haskell or F# Or ocaml...
- lmm 10y ago> A programmer who wants to use a ML-like language that doesn't need that feature should instead be using Haskell or F# Indeed. Since I think that's the majority of programmers (whether they know it or not), I wish it was Haskell and F# that were getting the mainstream attention, and Rust that was the niche language with the, well, small cult following.
- cd_cd 10y agoWell I'm one of those idiots then. Currently, I'm employed to write very fast scientific and engineering software. We work almost entirely in C because it gives the performance we need (and not just because of memory management). Programming in C makes it very easy to assess what is causing performance bottlenecks as the disassembly maps tightly to the C code (typically 1:3 to 1:6 source to instruction ratio). This makes it easy to assess if the symbolic code needs changing or the compiler just isn't doing a good enough job and you may need to use intrinsics or rewrite in assembly. And I can tell you this is a massive sector employing a lot of engineers.
- lmm 10y agoI mean, what do you want me to say? Yes, judging by what you've said and without knowing the details of your requirements, I think it's most likely you (and your organization) are among the idiots. I've worked in that sector, replacing that kind of code with higher-level code in a "slow" language that somehow managed to run orders of magnitude faster, because when you're in the trees of disassembly and intrinsics it's all too easy to miss the forest of using the wrong algorithm or even making a calculation that just isn't necessary. Even in the cases where you don't make that kind of mistake, you can fix a problem with generated assembly as many times as you like and it will all be worthless compared to fixing the problem in the compiler once and for all. There is good, valuable work being done in that world, don't get me wrong, and it's entirely possible you're on that side of things - but it's very much the exception rather than the rule IME.
- cd_cd 10y agoWell if you use a poor implementation or the wrong algorithm then you're going to get poorer performance in any language. However, all things being equal, you're not going to get better performance from a higher level language and you certainly cannot fine tune the implementation for a particular platform as you can with lower level code - that's a fact. Now whether it is worthwhile doing that depends on each case and how long the process takes to execute. I often prototype in higher level languages including R, Python and C#. Once I need a professional implementation or put them into commercial software I use C even if the front end is written in C#. C is just orders of magnitude faster than C#, even when the C# multithreaded, is coded in unsafe mode and optimised and C is single threaded and compiled with no optimisation.