[Grace-core] Edited Variable & Constant page
Kim Bruce
kim at cs.pomona.edu
Thu Nov 18 14:25:33 PST 2010
I would NOT like to use := to initialize constant bindings. I can go either way with initializing variable fields, though probably prefer :=, as it makes it parallel to regular assignments.
Kim
On Nov 18, 2010, at 11:28 AM, James Noble wrote:
>> I know it is unusual, but I still like the idea of setting fixed bindings with "is", as that sounds more permanent.
>>
>> const x is 17
>
> yep - and I like "=" for just the same reason.
>
> How, then, do you assign, OK not assign: *bind* them in e.g. constructor bodies:
>
> x is 17
>
> or back to
>
> x := 17
>
> One good thing with EGAL is that (I'm pretty sure)
> if you say "const x = 17" or in fact "const x = e" for *any* e
>
> it will always be the case that x = 17 (or x = e) no matter how mutable "e" is.
>
> J
More information about the Grace-core
mailing list