[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: explanation of ":=" proposal+examples
- From: Tom _ <tom7ca@...>
- Date: Fri, 1 Jun 2001 04:32:06 -0700 (PDT)
> I'll give it more thought. What about old code like
> the following in your
> system:
>
> function f()
> local x = 4
> x = 3 -- is this legal?
> end
>
> It would need to be legal for any old code to work.
Yes: existing code would work unchanged.
> 3. both assignments (or maybe just '=') could be
> overridden with explicit
> local or global keywords (note, overriding '=' is
> needed for backward compatibility). [...]
> Why impose a style?
Actually, I'd rather suggest enforcing a style in
which "=/local" and ":=/global" cannot be mixed in
the same function. That way, the compiler can
generate more meaningful warning/error messages.
Anyway, I'll play around with the implementation
a bit more. Maybe I can generate a patch for this
or a closely related proposal.
Tom.
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/