[Oberon] Expression to the left of the variable
Joerg
joerg.straube at iaeth.ch
Fri May 7 14:48:27 CEST 2021
I see it the same. But I would prefer -> iso =:
Jörg
Am 07.05.21, 14:44 schrieb "Oberon im Auftrag von Diego Sardina" <oberon-bounces at lists.inf.ethz.ch im Auftrag von dsar at eml.cc>:
On Thu, May 6, 2021, at 3:57 AM, eas lab wrote:
> it's what you get used to.
> For decades I was comfortable with Pascal syntax.
> Now it looks klunky & I want syntax-coloring to distinguish it's
> function/arguments/result.
> IMO `poplog` has the clearest syntax:
> "a+1->b" is better than "b :=a+1"
Yes, older languages had this syntax.
This is also mentioned in Wirth's compiler book but left as exercise.
I would like to discuss it with you (all) since I wasn't sure of my answers.
----
10.2. Had the assignment statement in Oberon been defined in a form where the assigned expression occurs to the left of the variable, that is for example by the form e =: v, would compilation of assignments be simpler in any way?
10.3. Consider the introduction of a multiple assignment in Oberon of the form e =: x0 =: x1 =: ... =: xn. Implement it. Does the definition of its semantics present any problems?
----
My answer for the first is that it simplifies the code generation for the assignment since it follows the flow and in the second I don't see any problems in its semantics.
In general I see only advantages in both for lexing, parsing and code generation.
What are your answers?
--
Diego Sardina
--
Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
https://lists.inf.ethz.ch/mailman/listinfo/oberon
More information about the Oberon
mailing list