4 ms·
> Theoretically, the compiler is free to optimize the latter - if it notices that some code can be safely optimized in a mutating way, it is free to do that, bu
by truth_seeker 7y ago
> Theoretically, the compiler is free to optimize the latter - if it notices that some code can be safely optimized in a mutating way, it is free to do that, but then, someone needs to write that optimization - and the fact that this is not a priority for BEAM means that it is unlikely that someone will spend time to implement it if there are more pressing matters for them to do so.
I have no idea how they prioritize the new features to be built but IMHO safely optimizing code in mutating way is the reason why Haskell is so fast despite the heavy abstraction primitives it offers.
Also, what is the fun in writing perf code in another (native) language if host language is (or can be) capable by itself ?
- dnautics 7y agoWhat's the uptime, reliability and distribution story for Haskell? If I want to have three nodes sharing common state (either eventually consistent or using a consistency model like raft) how do I implement this with (X) Nines of uptime in Haskell? What's the process restart story for Haskell?
- truth_seeker 7y agoNitpicking won't help. I was comparing the probable features to be implemented and not Languages. I used the reference of Haskell just to make a point that "Immutable Abstraction can be backed by safe mutable implementations"
- dnautics 7y agothe point is that the data structures in erlang are chosen with abstractions necessary to support its features. "safe" for haskell is not the same as "safe" for erlang, and that why it's not easy to implement some of the things that are trivial in erlang, in haskell. Conversely, there are some things that are really safe in haskell (type safety and preventing process crashes) that you kind of have to add boilerplate to get confidence in erlang (or you just 'let it crash', which is a perfectly fine philosophy too). This is not saying that erlang is necessarily better, most of those problems have been "solved by kubernetes" anyways.