5 ms·
Exactly. And optimized Haskell doesn't quite look to "that beautiful FP language" anymore, but becomes more imperative.
by zura 12y ago
Exactly. And optimized Haskell doesn't quite look to "that beautiful FP language" anymore, but becomes more imperative.
- Dewie 12y agoIs this where someone points out the more functional intermediate SSA that imperative languages often get translated into at some point during the compilation?
- deleted 12y ago[deleted]
- LukeHoersten 12y agoI was thinking more stream fusion and rewrite rules etc. GHC is a lot more powerful in that sense than the other language compilers I mentioned. A lot of it in Haskell just boils down to bang patterns on data types. And where it does get messy as you suggest (yeah it does), you can nicely abstract it away behind a pure library interface. That way the mess is encapsulated.
- codygman 12y agoYou know how people use Python for most of their code and write c bindings for performance intensive parts? Idiomatic Haskell for most of my code and imperative Haskell for performance achieves something similar without having to switch languages. If you really need C, Haskell also makes it pretty easy as well.