4 ms·
> [...] TBH I don't see the advantage of his multi-stack proposal compared to local variables as in Factor [...] Local variables effectively turn the language
by smaddox 5y ago
> [...] TBH I don't see the advantage of his multi-stack proposal compared to local variables as in Factor [...]
Local variables effectively turn the language into the lambda calculus. They're equivalent in the sense of any two Turing-complete languages being "equivalent", but there are important distinctions. First, allowing the binding of values to variables breaks automatic enforcement of linearity (and of the other substructural sub-languages when intrinsics are restricted). Second, it breaks the concatentive principal and forces you to worry about variable hoisting and renaming when factoring and refactoring.
> I am also not clear what the advantage of multistacks is for side effect control [...]
It's less about control and more about ergonomics and simplicity. Multistacks will essentially give us a capabilities/effects system for free, once we have qualified types with type inference.