gleam-lang / suggestions

📙 A place for ideas and feedback
26 stars 2 forks source link

Track effects used by functions #49

Open lpil opened 4 years ago

lpil commented 4 years ago

I've had the idea of tracking function purity in my head for some time now, and now I discover that Nim has a similar system!

This prior art will be very useful for designing any future effects tracking in Gleam :)

Links

Rough sketch of how it might look in Gleam

https://github.com/gleam-experiments/experiments/blob/master/effects.gleam

lpil commented 4 years ago

An interesting piece of research on coeffects tracking http://tomasp.net/coeffects/

lpil commented 3 years ago

The other day @crowdhailer cleverly noted that it could be useful to track whether functions are async when targetting JavaScript. This could be a use for effects tracking.