12 ms·
ISTR that Jon Blow has a built in context mechanism in Jai. (Some googling later) Yes, it does. Looks like it supports a stack of contexts and is used for stu
by jdougan 3y ago
ISTR that Jon Blow has a built in context mechanism in Jai.
(Some googling later)
Yes, it does. Looks like it supports a stack of contexts and is used for stuff like allocators and loggers.
https://jai.community/t/context/ https://jai.community/t/context/
- karmakaze 3y agoThis is great! Not only does the context make it clear what can be done, it could be the only way it could be done. I.e. this can be a capabilities-based system where being able do to something is the 'permission' to do so. I don't know how that would work out when 'main' has all the capabilities (granted to the program/user running it) and it and each called function has to filter out what it wants to disallow (or only keep what it allows) to pass to called functions. Should be fine for a small number of capabilities but could get out of hand if too fine-grained.