[Aldor-l] comma vs. semicolon in default
Christian Aistleitner
tmgisi at gmx.at
Sat Jan 20 07:43:32 EST 2007
Hello,
On Fri, 19 Jan 2007 09:25:06 +0100, Ralf Hemmecke <ralf at hemmecke.de> wrote:
> What is actually the right way to specify default types in Aldor?
>
> default {n: Integer, s: String}
>
> default {n: Integer; s: String}
>
> Should there be a comma or a semicolon? Or is both OK?
>
> I was unable to find something in the Aldor User Guide.
> Any suggestions?
I'd argue towards not using grouping within declarations (except within
with or add statements). Then this problem is taken away and it would
increase readability.
If you insist on allowing grouping for decalarations I'd argue for using
";".
The main problem is that "default" does not need a value but may be used
as modifier in assignments and definitions. For such modifiers ("local" is
another example for such a modifier), the AUG is contradictory (see
section 8.13).
Therefore one has to guess what the AUG actually means.
I'd consider using AUG's example for the use of the modifier "local" with
a sequence of assignments (AUG section 8.13 bottom of page 108) a good
guess.
Therefore, I'd go for ";".
Kind regards,
Christian
More information about the Aldor-l
mailing list