Well-versed in the technical side of things thanks to extensive Software Engineering experience. Enthusiastic about Statistical Inference, Machine Learning and Visualizations. He/him.
Unfortunately Rust pretty much stops at "NullPointerExceptions". As long as Rust does not separate pure code from effectful one (on the type level) it's impossible to guarantee purity of view functions or any other functions. Thus the ability to "enforce proper patterns" at compile-time is limited.
I agree that Rust is also a great language. Many of its features have been heavily influenced by functional languages. In my personal (limited) experience using Rust, it still caused more runtime errors than Haskell code. Mainly due to what dev.to/gabrielfallen said: not being able to declare on the type level which functions have side effects makes it a lot harder to reason about code than when that information is included in the type. It also means that Rust couldn't enforce the MVP pattern as well as Haskell can.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Wow that sounds very interesting!
I'll take a look at your follow ups :)
If someone is interested in catching the most errors in compile time (without NullPointerException), you may be also interested in Rust.
Unfortunately Rust pretty much stops at "NullPointerExceptions". As long as Rust does not separate pure code from effectful one (on the type level) it's impossible to guarantee purity of view functions or any other functions. Thus the ability to "enforce proper patterns" at compile-time is limited.
You hit the nail on the head!
I agree that Rust is also a great language. Many of its features have been heavily influenced by functional languages. In my personal (limited) experience using Rust, it still caused more runtime errors than Haskell code. Mainly due to what dev.to/gabrielfallen said: not being able to declare on the type level which functions have side effects makes it a lot harder to reason about code than when that information is included in the type. It also means that Rust couldn't enforce the MVP pattern as well as Haskell can.