[J3] Syntax of conditional expressions

Gary Klimowicz gak at pobox.com
Tue Jun 29 22:55:33 UTC 2021

On Jun 29, 2021, at 15:23, Van Snyder via J3 <j3 at mailman.j3-fortran.org> wrote:

> On Tue, 2021-06-29 at 12:08 -0700, Gary Klimowicz via J3 wrote:
>> The verbose form in Algol-68 was much more concise to begin with:
>>     if a then b elif c then d else e fi      # 35 chars #
>> Compare to (21-157r1 line 28)
>>     if (a) then (b) elseif (c) then (d) else (e) endif ! 50 chars, 43% more
> Didn't Algol 68 have reserved words? I think Malcolm's argument was that the extra punctuation is necessary to avoid syntax ambiguities.

True, it did, but not exactly in the sense we're used to.

Reserved words were considered in a separate name space than identifiers, much like Fortran.

Algol 68 apparently had them emboldened in the "strict" language. "Stropping" could be used to distinguish them in machine text (quoting, prefixing with a period, writing in upper case, etc.).

And since identifiers could have spaces in them, it got fun. This is legal:
    int a real int = 3;

Probably so is this:
    int real = 3;

Don't trust any language under 50.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20210629/2ec03d54/attachment.htm>

More information about the J3 mailing list