3 ms·
What I found most interesting it's Kitten effects (actually coeffects) system based on the system of extensible records that allow very elegant permission compo
by snaky 10y ago
What I found most interesting it's Kitten effects (actually coeffects) system based on the system of extensible records that allow very elegant permission composition.
Author of Kitten gives some explanations comparing it with Haskell at https://www.reddit.com/r/programming/comments/4mzlvi/10_lesserknown_programming_languages_worth/d422nyi https://www.reddit.com/r/programming/comments/4mzlvi/10_less...
- groovy2shoes 10y agoAha! I hadn't realized they'd officially landed already. Yeah, the effects are one of those "really neat" things I was referring to :) I've been thinking about how they could be used with a term-rewriting system for certain kinds of optimization. Some rewrite rules only apply under certain conditions that may or may not be lexically apparent in the absence of an effects system. As a simple example: rewrite {f map} {g map} compose => {f} {g} compose map ; This transformation will only work if `f` and `g` are pure functions: if `f` and `g` have side-effects, then the transformation is no longer equivalent. But using the effects system, we can give rewrite rules a sort of context that lets the rewrite system know the extra conditions necessary for a rule to apply.