Ralf Hemmecke <[EMAIL PROTECTED]> writes:
> But clearly, the form
>
> => "iterate"
>
> or
>
> => nil
>
> is misleading. Better is to write:
>
> => "Please think carefully what happens here."
>
> ;-)
>
> > Any other candidates for the name contest? Maybe nil? (also used sometimes)
>
> I only support iterate as a keyword. Anything else is confusing, because one
> would have to give a value where none is needed.
Yes, of course. I never proposed to change or add a keyword. It wouldn't
help. I only thought it would be good to have a convention.
> In the example above (case "iterate") instead of
>
> {
> stdout << i << "B" << newline;
> i > 1 => "iterate";
> stdout << i << "C" << newline;
> }
>
> one should rather write a not so confusing form...
>
> {
> stdout << i << "B" << newline;
> if not (i > 1) then stdout << i << "C" << newline;
> }
Well, the point is, in actual (SPAD) code we often have:
for i in l repeat
statement0
(cond) => "next"
statement1
statement2
statement3
statement4
statement5
statement6
statement7
statement8
statement9
statementa
statementb
statementc
which is, in my opinion, better to read than
for i in l repeat
statement0
if not cond then
statement1
statement2
statement3
statement4
statement5
statement6
statement7
statement8
statement9
statementa
statementb
statementc
Furthermore, I do not have the time to check the semantics of all loops in
axiom right now, I wasted already too much. So I thought a convention (telling
the reader: no value needed here), would be a good thing.
Hm, how about void()? That should be clear enough?
Martin
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
open-axiom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/open-axiom-devel