[Oberon] Expression to the left of the variable
August Karlstrom
fusionfile at gmail.com
Sun May 9 15:46:38 CEST 2021
On 2021-05-07 14:38, Diego Sardina wrote:
> On Thu, May 6, 2021, at 3:57 AM, eas lab wrote:
>> IMO `poplog` has the clearest syntax:
>> "a+1->b" is better than "b :=a+1"
[...]
> In general I see only advantages in both for lexing, parsing and code generation.
>
> What are your answers?
With the assigned variable to the right, the programmer needs to
visually scan the entire line (or maybe more than one line) to find out
what kind of statement it is. When the assigned variable comes first,
the assignment symbol is close to the beginning of the line which in my
opinion is clearer.
-- August
More information about the Oberon
mailing list