Re:Is Haskell a good choice for software security?
by spekcular on Friday December 17, 2021 @01:16PM
(#29595977)
Rust has better tooling, more direct control in performance-sensitive contexts (no opaque performance traps like, arguably, Haskell), and more community/industry support (meaning more useful and high quality packages). So from the perspective of practically solving problems, it seems better to me. But I could be convinced otherwise by a good argument.
I'm not a Haskell expert, I just dabbled with it and liked it.
> The selling point of Rust is (very, very) roughly "C++ without the bad parts, and some more good parts." Given the demonstrated utility of C++ (and demonstrated pitfalls) this is manifestly appealing. Avoiding memory safety related security holes alone is huge.
The selling point of Haskell is that it's a Functional Programming first language (see: "Why Functional Programming Matters"), has a better statically type system than C/C++/Java which makes whole classes of bugs common in those languages harder to write in Haskell (so if writing correct code is a priority, that's your use case), and memory safety related security holes are harder to write, just like with Rust. Laziness (or non-strictness, whatever) is also a big if controversial selling point (why: read "Why Functional Programming Matters").
If you like slightly less opinionated (or non-strict by default) languages, you could go with OCaml or Standard ML instead.
Why would you prefer Rust? Why don't you ask a Rust advocate?