▲ | codethief 3 days ago | |||||||||||||||||||||||||
> but so far I have only vague ideas that they could be combined with algebraic effects in some way in functional programming. This. Algebraic effects seem very much destined for this purpose. You could safely run any code snippet (LLM generated or not) and know that it will only produce the effects you allowed. | ||||||||||||||||||||||||||
▲ | nostrademons 3 days ago | parent [-] | |||||||||||||||||||||||||
Interesting. I hadn't heard of algebraic effects, but they remind me a lot of the Common Lisp condition system, or delimited continuations, or monads in Haskell. There's even a shoutout to monads in the top Google result for the context: https://overreacted.io/algebraic-effects-for-the-rest-of-us/ I assume that the connection to capability security is that you use the effect handler to inject the capabilities you want to offer to the callee, and their access is limited to a particular dynamic scope, and is then revoked once it exits from that block? Handler types effectively provide for the callee and define what capabilities it may invoke, but the actual implementation is injected from a higher level? | ||||||||||||||||||||||||||
|