ALGOL 68 has the nice property that there are no variables/lvalues: There are names that are bound to constant values, and there are values that are addresses. "int x := 5" is shorthand for stack-allocating an int and binding x to its address (so the type of x is "ref int").
-
-
Yes, agreed. I'd like to see a low-level language that makes this distinction cleanly with minimal syntactic noise and semantic confusion, but it seems tricky.
-
In a toy language, I used p^ and p:=p^+1 for reading and writing, p^.x and p^[0].x for reading and then accessing a field, and p.x and p[0] for obtaining a substructure pointer which looks just like an ordinary pointer. Super clean once one accepts the need for explicit reads.
- 11 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.