Hacker News new | past | comments | ask | show | jobs | submit login

Your experience of using Haskell is that it causes more bugs than less abstract languages?



No, on the contrary, my experience with Haskell is that my code is mostly bug free, but ends up less performant because you can accidentally create huge trunks in the heap and it consumes too much mental stamina.

However, there exists an intermediate plane of abstraction over C and under Haskell that is absolutely horrendous and results in all sorts of weird bugs and unpredictable situations.


I've heard people say that Haskell would be better with eager rather than lazy evaluation, because of the mental burden that it causes. IMO that doesn't seem like a hard problem to solve. We can design pure functional languages with eager evaluation.


Haskell would be better if it used polarity and focusing to make both strict and lazy evaluation first-class citizens in the language. A stricrly-evaluated counterpart to Haskell is just ML, which we've had since the 1970s.


I've coded in OCaml, which wasn't pure immutable, but rather immutable by default. Because it has mutability, that removes the focus on immutable data structures, making it a very different language.


You can make any module strict by using the XStrict language pragma in Haskell.


What about Rust?


It solves memory problems and certainly doesn't shoot your foot with destructors, weird moves and so on like C++, it lacks a garbage collector which imho is a big plus (though, as C# and Java show it is not necessarily a big problem), and I prefer the trait system over than Cxx's virtual classes/interfaces. I also like that the compiler is very helpful, it introduces some friction while writing, but I suppose that is my lack of expertise.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: