4 ms·
Can’t this be expressed as a library in Haskell or even F# though?
by pharmakom 5y ago
Can’t this be expressed as a library in Haskell or even F# though?
- AnimalMuppet 5y agoThat style sounds like it's mutating variables when other variables change (that is, mutate). That doesn't sound like a good fit for Haskell...
- kian 5y agoHaskell is great at mutating variables. Reactive programming was even pioneered in it. It's just that the Monads that allow you to do this are somewhat like sticky tar - everything they touch becomes a part of them. The traditional structure of Haskell programs is to build a pure functional 'core', and layer around that the 'sticky' parts of the code that need to interact with the outside world.
- AnimalMuppet 5y agoOK, but the "reactive" programming sounds like how you build the core. So I still question whether that style fits well with Haskell.
- pharmakom 5y agoHaskell has do notation and monads (F# has computation expressions, which are similar). These allow you to implement things as libraries that in most other languages would require changes to the compiler. Lisp macros can do it too. You could push the reactivity monad right down to the core of your application to get the benefits of this reactive language.