This is a really well explained extended example. Makes it clear how immutability solves some problems and doesn’t solve others. I’m now intrigued by effect systems, although it seems they’re still at the research/experimental stage?
Yeah - as far as languages oriented at practical use, you can try effects systems in TypeScript, Idris, or Haskell. Using them in Haskell is somewhat weird because most of the libraries you’ll want to use are instead written with monad transformers. TypeScript has more web-oriented infrastructure already written than Idris does.
Don’t forget Purescript :)
Eff http://www.eff-lang.org/ - Effects are first-class citizens
I’m working on an effect implementation for Scala: https://github.com/m50d/paperdoll . If you or anyone else can suggest useful effects from the existing scala ecosystem that it would be worth adding adapters for (so far I’ve done scala-arm and am thinking of doing doobie next) I’d appreciate it.
Memo to self: try adding treelog too. And create a paperdoll-all module that depends on everything for convenience.
I’m reminded of operational transformation, which I suppose is a method of optimistically merging effects:
I don’t understand the asset depreciation example. Recording the date should be sufficient for all calculation.
…But it is such a perfect place to start.