5 ms·
15 commits 4 years ago, 121 commits 8 months ago If these things are so good why does no one use them? EVERYONE using Erlang is using the same hotswapping faci
by tree_of_item 9y ago
15 commits 4 years ago, 121 commits 8 months ago
If these things are so good why does no one use them? EVERYONE using Erlang is using the same hotswapping facility. This sort of dynamism is just fighting against the language in an environment like Haskell.
- naasking 9y agoBecause Haskell isn't used in the same domains as Erlang, and hot patching full Haskell semantics either isn't needed, or the program is likely already using a DSL for the parts needing well defined dynamism, like the Yi editor, and so hot patching the runtime isn't needed.
- kobeya 9y agoWhy would you need to? GHCi supports dynamic code reloading which most people do during development. During runtime there’s not so much of a use case though for most people.
- kobeya 9y agoReplying to myself. There are some use cases though, and in fact my comment points to one of them. Xmonad configurations are themselves Haskell code, and Xmonad does dynamic code reloading to make configuration changes without having to logout. Xmonad rolled their own solution, but "dyre" is a reusable generalization inspired by what Xmonad does. Using Haskell DSL's for configuration of Haskell programs has some significant advantages and dynamic code reloading is essential if the program itself is long-lived or can tolerate no downtime. I don't meant to imply there are no uses ... but outside of configuration or development environments (or real-time routing algorithms in Erlang's case, something I wouldn't advise doing in Haskell) I really don't know what general use cases there are for it. If someone does though, I'd love to learn something new.
- sitkack 9y agoHot code reloading isn't used in practice to much extent in Erlang codebases either. It exists, in my experience mostly for Dev or emergency patch but not for normal release upgrades. Dynamics with tagged values and pattern matching def make Erlang the easiest to hot reload.