Hacker News new | ask | show | jobs
by ShaneWilton 3501 days ago
You might be interested in coeffects. Just like monads can be used in a language like Haskell to model effectful operations, you can use the dual of monads, comonads, to model the dual of effects, coeffects!

Coeffects can be used to represent the "context" of a program, which includes things like permissions or capabilities that the program may have access to. They provide a fascinating way of modeling all kinds of information that is traditionally not handled by even powerful type systems like OCaml's or Haskell's.

You can read a lot more about the topic on Tomas Petricek's website: http://tomasp.net/coeffects/

I especially recommend this short article from 2014: http://tomasp.net/blog/2014/why-coeffects-matter/

1 comments

Thank you, that sounds very interesting.