I have just realized that the specification of DO is not what we wanted.
I followed the Scheme specification of DO here. You will find on the web
statements in various places that Scheme DO implements DO-UNTIL. Those
statements are incorrect. What Scheme DO implements is in fact
WHILE-NOT. That is: a Scheme DO loop may not perform any executions of
the body at all.

I tend to believe that there are good uses for all of the following
constructs:

  WHILE       perform body while test remains true
  WHILE-NOT   perform body while test remains false
  DO-UNTIL    perform body until test becomes true, running at least
              once.

Of the three, I believe that WHILE-NOT is the least commonly useful, and
that it is trivially subsumed by WHILE.

I am therefore inclined to remove DO from the specification, replacing
it with WHILE and UNTIL, each having the obvious canonical rewritings.

Objections?


shap

_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to