3 ms·
I wrote about this some time ago. https://arianvp.me/lenses-and-prisms-for-modular-clientside-apps/ https://arianvp.me/lenses-and-prisms-for-modular-clientside-
by arianvanp 9y ago
I wrote about this some time ago. https://arianvp.me/lenses-and-prisms-for-modular-clientside-apps/ https://arianvp.me/lenses-and-prisms-for-modular-clientside-...
However, recently I discovered Halogen [0]. It is very similar to Elm Architecture, however, every component has its own _internal_ state, so you do not have to thread all state changes to the top-level component. It does this by existentially quantifying over the State [1].
Halogen is written in Purescript, which is a transpiler for javascript (yes transpiler, not compiler). Which means you basically get javascript semantics with a haskell typesystem + very good interop with JS, and no runtime system. The code purescript generates is actually readable. [2]
[0] https://github.com/slamdata/purescript-halogen/tree/master/docs https://github.com/slamdata/purescript-halogen/tree/master/d...
[1] https://wiki.haskell.org/Existential_type https://wiki.haskell.org/Existential_type
[2] https://purescript.org/ https://purescript.org/
[3] http://try.purescript.org http://try.purescript.org
- dragonwriter 9y ago> Halogen is written in Purescript, which is a transpiler for javascript (yes transpiler, not compiler). Transpilers are a subset of compilers; it is impossible for "yes transpiler, not compiler" to be true.
- KirinDave 9y agoThank you for being a force for sanity in the universe. "Transpiler" is a distinction without a difference to add yet more jargon to our already cryptic profession.