Ralf Hemmecke <[EMAIL PROTECTED]> writes:
| >>> My view on scoping is that
|
| >>> b:Integer:=1
| >>> b:Float:=2
|
| >>> in the same scope should be an error.
| >> Why?
|
| > Which one to pick? There are at least three different answers
simulatenously
| > in all AXIOM systems,
| > I'm consistently picking one.
| > We had this discussion before.
|
| Right. I actually don't understand why that is a problem.
It may be a problem for some (like me), it may not be a problem for
others. So, I would not hold my breath for a universal truth.
| Does it have to do with being a 'variable' vs. being a 'constant'?
I don't understand the question.
|
| But at least if I defined constants it should be no problem as in the
| following program.
|
| #include "aldor"
| #include "aldorio"
| f(a: Integer): (Integer, DoubleFloat) == {
| b: Integer == 2;
| b: DoubleFloat == 7.0;
| (b, b);
| }
| import from Integer, DoubleFloat;
| (i, d) := f(1);
| stdout << i << ", " << d << newline;
|
| It is completely clear what the last b's are.
It may be completely clear to some, not so obvious to others.
| Wouldn't you accept such a program?
Honestly, I don't know. Maybe my indecision could be pushed one way
or another if I'm offered a concrete situation. My general preference
is for programs that do not require excessive cleverness from the reader.
| The aldor compiler also doesn't let me have two variables with the
| same name and different type in the scope. And I would like to
| understand why it is allowed for constants but forbidden for
| variables. Where is the problem?
I cannot speak for the Aldor language.
I can only express *my opinion* for OpenAxiom.
-- Gaby
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
open-axiom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/open-axiom-devel