Another fun insight gained this week: the unsafe keyword is actually two keywords in a trenchcoat. Much like `async/.await` there is the:
- function modifier (`unsafe fn`)
- call convention (`unsafe {}`)
Back in the day (pre-1.0) I _think_ there were ideas to rename `unsafe {}` blocks to `trusted {}`, but I don't think it went anywhere. It seems quite similar to modal types, where you 'box' and 'unbox' terms… but not sure!
To make it more clear, I'm interested in the ways your abstracted keywords work… like I'm assuming that some of the keywords correspond to coeffects, and some correspond to effects? But I could be mistaken.
can explain better… but I think it’s something that _needs_ to be true in a context for something to be used, vs, something that could _possibly_ change the context if something is used.
The weird thing is that some things can be expressed either as effects or coeffects… like state? So `const` might be a coeffect, but `async` might be an effect? I could be wrong though - and I know that Rust's async has interesting quirks to it so I'm not sure.
I think this matters because coeffects distribute over effects (like in the distributive laws in arithmetic)? Not sure if this only shows up if you have graded effects like in Granule, where you can have ‘shades’ of a property, like a variable that might need to be used 3 times.