I find the levels vs indices or syntax vs domain vs terms to be kinda fuzzy descriptively
Conversation
syntax vs domain comes up a bit in NbE
1
Syntax is the thing you are evaluating from - the 'terms', domain are what you evaluate to - the 'values'. I think. But it's still kinda confusing why they ended up being called that.
1
I know the concepts. I just think it’s terrible jargon that fails to communicate unless everyone first syncs up on nbe.
1
1
Agreed. I'm definitely interested in figuring out something better, even just for NbE. Let me know if you have any ideas!
1
I'm trying to figure out a better way to organise my modules in my core crate: github.com/brendanzab/rus
1
atm core (the syntax) is inside the syntax module. and domain is in the syntax module too (kind of at odds with nbe). Not sure what to call these modules and where to put them.
1
At least I'm pretty happy with the names I've used for the variants in my core syntax and elsewhere: github.com/brendanzab/rus
2
1
I've found 'level' to be annoying, because it really feels like it should be called an 'index'. Because you're indexing from the start of the environment.
1
ok, so phrased differently: you’re using codebruijn aka “debruijn levels” aka distance from the top for static semantics, and debruijn indices / aka stack offset for dynamic semantics?
2
1
If by ‘static sementics’ you mean ‘the result of evaluation’ - ie. what you check against, and ‘dynamic semantics’ you mean ‘what you provide to the evaluator’ ie. the elaborator output.
1
i guess, if you mean static semantics == type checking vs dynamic semantics == runtime

