3 ms·
How would Emacs with a typed programming language work with function redefinition? One of the benefits of the environment is I can change code very easily and
by nonbirithm 6y ago
How would Emacs with a typed programming language work with function redefinition?
One of the benefits of the environment is I can change code very easily and see the changes quickly. But with types I'm not sure how you'd change the signature of a function and get it to recompile if it's already used elsewhere.
- reuben364 6y agoThat's one thing I have been thinking about. I think Haskell and other statically typed functional programming languages would benefit from a more interactive REPL like experience for "non-pure" programming where you are sort of changing the wheels on a moving car. This has a very reactive flavor, so I think you could have a sort of functional reactive approach where your hot-swappable definitions are represented as behaviours over time. How to make that get out of your way until you actually want to swap things out, I have no clue. I think it will involve some sort of effect system, but I'm not sure if that will solve the problem.
- reuben364 6y agoI realize now that you were talking about changing types, which I didn't factor in. I guess what would happen is you would cascade the hot swapping, reloading anything which depends on the function for which the type has changed.