New Syntax for Programming Languages
Regular assignment statement is usually read from left to right
but its logic is going in opposite direction, rvalue is going to be
assigned to lvalue, not vs versa.
Same with object-oriented notation. Logic there is going from
right to left too. Because we looking first for the rightmost
subclass of the class, then one higher until uppermost class
in hierarchy.
So it makes sense to offer different more natural syntax where
elements as a logic flow from left to right.
For assignment it will be
a - b -> a instead of a = a - b
and for object-oriented notation
m@b instead of b.m
Comments
Post a Comment