4 ms·
IIRC, functional programming already offered const-ness and type-safe concurrency. Do you think Rust might succeed here where FP couldn't really make much of a
by verdagon 5y ago
IIRC, functional programming already offered const-ness and type-safe concurrency.
Do you think Rust might succeed here where FP couldn't really make much of an impact?
- monocasa 5y agoFP with typesafe concurrency hasn't really happened on the frontend yet in meaningful way. And I wouldn't frame it as Rust succeeding where FP failed, but instead a way to sneak in FP into the frontend in a way that gets really angry at you when you try to structure your code as mutable and imperative. Yes, most of the frontend languages let you opt in to constness and compile time typesafety, but Rust makes you opt out. It's soft developer thing, but it seems to have benefits to code quality from my experience.
- brundolf 5y agoFP isn't a technology, it's a way of using technology. You can follow it using JavaScript, or Rust, or Elm, or whatever. But JavaScript doesn't offer true constness (at least, not enforced). Elm does, but no JavaScript-targeted language (including Elm) has proper concurrency at all, type-safe or not (there are Workers, but they come with a bunch of caveats). Rust has good support for FP, type-safe concurrency (whether in an FP style or not), and mostly type-safe constness. Of course it also has its own set of tradeoffs, like anything else.