Ralf Hemmecke <[EMAIL PROTECTED]> writes:

| >>  If I have something like
| >>
| >>
| >>         j: Integer := 0
| >>         for i in 1..5 repeat
| >>                 j: Integer := i2
| >>         output(j::OutputForm)$OutputPackage
| >>
| >>  that should not be allowed at all.
| > Why?
| 
| ---> The answer has already been given below. ;-)
| 
| >>  Since it declares j twice in the same
| >> scope (yes, you caught me with that "declaration" stuff).
| 
| > But, why do you think they are the same scope?
| 
| Because that is what I read from Section 8.1 AUG:
| 
|    Note that the last two bind names in particular positions in the
|    expression, and **do not form general scope levels**.
| 
| Do you read that differently?

You're readint the Aldor specification to me; I'm talking from
`language design' principle poit of view.  When I asked why, I'm not
just expecting `because AUG says so'; but a rationale of why it should
be so.

| >>  As I understand you openaxiom now introduces a new scope for the for-body.
| 
| > A loop body, where explicit for or a collect or a reduce implicitly
| > introduces a scope to shield local computations from enclosing scope.
| 
| BTW, I didn't say that this is a bad thing. It only is not the way
| that Aldor is specified.

OK.
I think only Aldor can be a perfect imitation of Aldor.

-- Gaby

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
open-axiom-devel mailing list
open-axiom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open-axiom-devel

Reply via email to