[J3] [EXTERNAL] [BULK] Re: A couple more ideas for features

Brad Richardson everythingfunctional at protonmail.com
Thu Apr 6 22:13:53 UTC 2023

I'm not opposed to it just being bare UNTIL(...), but I think it's worth considering alternatives. As far as the exact way to change the syntax, I'd add

R1123 (loop-control) would add
or UNTIL ( scalar-logical-expr )

R1132 (end-do-stmt) would add
or WHILE ( scalar-logical-expr) [ do-construct-name ]
or UNTIL ( scalar-logical-expr) [ do-construct-name ]

Note that this requires an extra constraint. If loop-control is CONCURRENT, then the corresponding end-do-statement shall be END DO [ do-construct-name ].

This enables a variety of possibilities. I.e.

DO i = ...
WHILE (...)




Is that what we want? I'm not sure.

As for "RTFM", look into the study of "Human Factors" (https://en.wikipedia.org/wiki/Human_factors_and_ergonomics)

"... Primary goals of human factors engineering are to reduce [human error](https://en.wikipedia.org/wiki/Human_error), increase productivity and system availability, and enhance safety, health and comfort with a specific focus on the interaction between the human and equipment."

A good design is one in which RTFM is unnecessary, because things are intuitive. RTFM should never be the default position in language design (IMO). If there is consensus that the proposed syntax is intuitive I'm good with that.


On Thu, 2023-04-06 at 14:46 -0700, Van Snyder via J3 wrote:

> On Thu, 2023-04-06 at 20:58 +0000, Brad Richardson via J3 wrote:
>> Yeah, not saying it wouldn't work. Just from a language design point of view, if feels naked and a bit unintuitive as far as does it control the statements before or after? At least to a new comer to the language.
> I remember the cover of the printed "man" pages for Unix in the 1970's had "RTFM" in bold letters.
> I don't think there would be any significant confusion if WHILE(...) at the beginning of the construct were described, with the appropriate ISO circumlocutions, as being tested before the construct block is executed, and UNTIL(...) at the end of the construct were described as being tested after the construct block is executed.
> I can't think of a reason to have different constructs, one allowing WHILE(...) at the beginning and only END DO at the end, and the other allowing only DO at the beginning and UNTIL(...) at the end. One construct that allows both "controls" would be simpler.
>> On Thu, 2023-04-06 at 13:55 -0700, Van Snyder via J3 wrote:
>>> On Thu, 2023-04-06 at 15:22 +0000, Brad Richardson via J3 wrote:
>>>> I'm open to suggestions for exact syntax of the ending conditionals
>>> At least one language, I don't remember which one, allowed WHILE(...) at the beginning and UNTIL(...) at the end of the same construct.
>>> R1123 (loop-control) would remain unchanged.
>>> R1134 (end-do-stmt) would have
>>> or UNTIL ( scalar-logical-expr ) [ do-construct-name ]
>>> added
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20230406/a0ecb7cb/attachment.htm>

More information about the J3 mailing list