6 ms·
Why not go full functional programming at that point? If the main issue with FP has been accessibility, then it should really take off now.
by ikety 7mo ago
Why not go full functional programming at that point? If the main issue with FP has been accessibility, then it should really take off now.
- zozbot234 7mo agoWhen you do fully value-oriented programming in Rust (i.e. no interior mutability involved) that's essentially functional programming. There's mutable, ephemeral data involved, but it's always confined to a single well-defined context and never escapes from it. You can even have most of your code base be sans-IO, which is the exact same pattern you'd use in Haskell.
- theLiminator 7mo agoI actually like rust more than Haskell, but `You can even have most of your code base be sans-IO, which is the exact same pattern you'd use in Haskell.` glosses over the fact that in Haskell it's enforced at compile time.
- josephg 7mo agoAnother argument as to why rust isn't the forever-language. My forever language should include effects! Even rust has need of this. For example, I want a nopanic effect I can put on a function which makes it a compile error for anything that function calls to panic.
- theLiminator 7mo agoThough I think it's the closest language right now, ideally you have something that is close to "zero-overhead" as your forever language. I really like how flix.dev looks, but there's always a little nagging at the back of my head that something like rust will always produce more performant software.
- echelon 7mo ago> Even rust has need of this. For example, I want a nopanic effect I can put on a function which makes it a compile error for anything that function calls to panic. This! This apart from build times is my biggest request for the language. Nopanic, nomalloc, etc.
- jimbokun 7mo agoIsn’t Rust a pretty good functional language? It has most of the features that enable safe, correct code without being anal about immutability and laziness that make performance difficult to predict.
- tehnub 7mo agoI wouldn’t because idiomatic Haskell is way slower than idiomatic Rust.
- deleted 7mo ago[deleted]