[bitc-dev] Error in specification of DO
Jonathan S. Shapiro
shap at eros-os.com
Wed Jul 9 23:07:14 CDT 2008
On Wed, 2008-07-09 at 23:16 +0100, David-Sarah Hopwood wrote:
> Jonathan S. Shapiro wrote:
> > I tend to believe that there are good uses for all of the following
> > constructs:
> >
> > WHILE perform body while test remains tr
> > 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.
>
> C-family languages have DO..WHILE rather than DO..UNTIL, of course.
Yes. My mistake. Based on this we may safely conclude that do-while is
useful. :-)
So I now propose loop constructs named WHILE and DO-WHILE.
For the record, I considered and rejected some other loop constructs;
DO-UNTO-OTHERS
DONT-DO
DONT-DO-WHILE-NOT
DOO-BE-DOO-BE-DOO
Hmm. It's apparently later than I thought. :-)
More information about the bitc-dev
mailing list