On Mar 5, 2009, at 13:26 , Pal-Kristian Engstad wrote:
> This shouldn't be a problem if assignment uses a different syntax. For
> instance:
>
> do { x = 1;
> y = x + 2;
> x := y;
> y }
>
> If we dispense with the "do" key-word, we end up with something
> looking
> strangely similar to C. :-)
I've been thinking along these lines myself and I like the above
provided that 'x:=y' fails if y != 1.
a = b //unification; should throw an exception or fail and eval to
'false' if identifiers 'a' and 'b' are already bound to different
values.
a := b //assignment;
actually, I might like the statement 'x := y' to be a static error as
the identifier 'x' is already (permanently) bound in the given scope.
re: http://unlimitednovelty.com/2009/03/indentation-sensitivity-post-mortem.html
the reia-talk list is discussing indentation vs delimited blocks and
came to the conclusion that delimiting with whitespace leads to
problems for an expression-based syntax. However, the statement/
expression division seems natural to me so I'm in favor of a separate
syntax for each.
-ipc
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev