What languages other than Haskell track or control side effects in functions? How is this presented in the language?
Conversation
There's a bunch listed here under the “Software” heading:
2
4
Not listed here is granule-project.github.io The site is a bit intimidating, but I assure you it is cool! I like the promise of being able to get different co-effects like linearity and staging working nicely with effects.
2
1
Another interesting language is mercurylang.org, which implements effects in a logic language using uniqueness types, similar to in Clean – I think it was inspired by Clean, or they influenced each other.
1
1
DCGs in Prolog are another interesting kind of effect system: swi-prolog.org/pldoc/man?sect - you can use them for parsing, but it's also possible to use them for state – not sure about other effects though.
1
EDCGs are an extension to DCGs allowing for multiple state arguments to be used at once: www2.eecs.berkeley.edu/Pubs/TechRpts/ (for SWI-Prolog: swi-prolog.org/pack/list?p=ed) - I've wondered if you could use this for some sort of fancier effect system but I have no idea.
1
The Functional Machine Calculus seemed interesting but I haven't been able to find an implementation (was thinking about giving it a go myself at one point):
- people.bath.ac.uk/wbh22/pdf/2022
- people.bath.ac.uk/wbh22/pdf/slid
Nim has an effect system that lets you track side effects using annotations on functions: nim-lang.org/docs/manual.ht

