4 ms·
Ok. More thoughts. I was trying to see what was special about Crystal in this regard. It seems like if you took any ML or Haskell-like, you'd have type infere
by mrkeen 4d ago
Ok. More thoughts.
I was trying to see what was special about Crystal in this regard.
It seems like if you took any ML or Haskell-like, you'd have type inference.
Then you could allow shadowing (Rust-style) meaning the same symbol in the source code would be one variable now, and a different variable later.
Then your compiler would need to distinguish x into x1 and x2 so it could track them separately.
So yeah, kind of an SSA I guess!
- buybackoff 4d agoYes, a lexical scope with shadowing