Re:Things you can’t do in Rust (and what to do instead)
by dathinab on Saturday May 15, 2021 @01:37PM
(#27167224)
> Haskell -- arguably a simpler language than Rust
From a PL research point of view maybe.
But from a POV of what is simpler to use for a average or new programmer, Haskell is far worse as far as I can tell.
> due to much more prevalent reliance on unsafe as well as FFI
Where? In embedded programming? Or programming from primitives (which I would argue a average programmer never should do, there are existing libraries)?
In some use-cases you always end up with a FFI, but that is also true for other languages.
Besides that usage of unsafe is both strongly discouraged and uncommon.
There are a lot of rust use cases where using unsafe code is never necessary to a point where people simple ban any direct usage of unsafe code in their project.
Re:Things you can’t do in Rust (and what to do instead)
by ta_ca on Saturday May 15, 2021 @09:46AM
(#27165182)
simplicty is important, but i believe it is not the most important metric for a PL and have no problem with complex PLs. the question; is it worth the trouble? c++s failure is not the complexity but c++ being one of the least orthogonal languages out there. in c++ you are able to compose two great things/ideas (other than my only options are c and c++ this is the biggest reason i prefer c++ over c) yet the end result is not more but less.
You (rightly, I think) place Idris (and Agda, although that's more a proof assistant than a PL) beyond the reach of the average developer, and also, apparently, Haskell -- arguably a simpler language than Rust, but never mind -- but not Rust. And that's my point and, I guess, our point of disagreement. If you think that, on that spectrum between, say, Python and Idris, Rust is at a good level for the average application developer to the point where maintaining high-level applications written in Rust would ever be cost effective, then I think you are out of touch with the realities of the software industry and the economic forces that shape it. I thought the exact same thing as you twenty five years ago: C++ was obviously the right language for the average developer -- even more so than, I don't know, Delphi or Visual Basic -- wasn't it?
> What's a better general-purpose language for this mythical "average" developer?
I don't believe any low-level language will be cost-effective for application development for the foreseeable future, if ever, and the average developer is anything but mythical (I mean, embodied as a single person, perhaps, but I'm talking about teams).
> Rust has the same level of memory safety
It doesn't (due to much more prevalent reliance on unsafe as well as FFI), but that's very much beside the point because, as you acknowledge, safety is not what it's about.