"Bill Page" <[EMAIL PROTECTED]> writes:

| On Fri, May 16, 2008 at 11:26 AM, Gabriel Dos Reis <[EMAIL PROTECTED]> wrote:
| > "Bill Page" <[EMAIL PROTECTED]> writes:
| >
| > | On Fri, May 16, 2008 at 9:10 AM, Gabriel Dos Reis wrote:
| > | >
| > | > Well, my understanding of your proposal was that in
| > | >
| > | >    if cond then
| > | >        x := 1
| > | >    else
| > | >        x := 2.3
| > | >    ...
| > | > the compiler would assign type Integer to `x' in the `then' branch,
| > | > and type Float  in the `else' branch, and type Union(Integer,Float) at
| > | > the meet point.
| > |
| > | No. I think *you* suggested that as an option in an earlier email.
| > | That was not my idea.
| >
| > My other suggestion (which I repeatedly said I was not proposing as
| > actual semantics, but only to point that the design space is large)
| > was a `real' overload of variables.  Not unions.
| >
| 
| In
| 
| 
http://sourceforge.net/mailarchive/message.php?msg_id=873aokc3f8.fsf%40gauss.cs.tamu.edu
| 
| you wrote:
| 
| "In the current semantics, branches of if-statements do not have their
| own scopes, so the meet environment of an if-statement is the union of
                                                           ^^^^^^^^^^^^^^  
| environment of both branches. And this is where the error comes in:
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| One cannot declared the same variable in the same environment with
| different modes."
| 
| By this I understood you to be talking literally about the type
| 'Union', although now with further explanation I understand that you
| were probably thinking about the compiler "environment" in a somewhat
| different way. But from your comment this solution seems obvious.

Gosh, you've picked my curiosity :-)
I literally wrote environment. :-/
How could that have been _probably_ something else in a somewhat
different way when I was talking about the compiler, environment, the
meet environement, and concluding with the impossibility of declaring
the same variable with different modes?

The solution may be obvious (as I thought) but it turns out to draw a
barrage.  Anyway, I've fixed the semantic errors in the algebra,
and I will implement the scope for if-statement later when I'm done with
more pressing issues.

-- 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