Ralf Hemmecke <r...@hemmecke.de> writes:

| > On the semantics note: 'until' is not just an abbreviation for 'while
| > not'. With 'until', the test is not after the body of the loop is
| > executed. Which means the body is executed at least once.
| 
| Oooops. Maybe you have implemented that with a different syntax in
| OpenAxiom, but to me it seems that in FriCAs we now can use something like
| 
|   until empty? somelist repeat
|     print first somelist
|     somelist := rest somelist
| 
| . 

It is exactly the same syntax, and I suspect exactly the same compiler
and interpreter implementation in all AXIOM systems.  If you look at the
generated code, you would see that the test  'empty? somelist' is done
after the body of the loop is executed. 

'until' is considered an iterator, and the uniform AXIOM syntax is to
line up all iterators before the loop, i.e. before 'repeat'.  So, I
would say it is consistent with predictable semantics.


| If that has the semantic that first the loop body is evaluated and
| only then the condition, that would confuse me even more, even in the
| case this is precisely described somewhere. If "until" is not at the end
| of the loop body, I still vote for removing it.
| 
| > If we are going to remove things because they are perceived
| > redundant, I propose to retrain only 'repeat' and remove all the
| > other iterators. They just abbreviations for some test-and-exit
| > instructions.
| 
| Exactly. That sounds like the specification in Aldor.

to be clear, that means also removing 'for', 'while', etc.

-- Gaby

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
open-axiom-devel mailing list
open-axiom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open-axiom-devel

Reply via email to