[Grace-core] Edited Variable & Constant page
Kim Bruce
kim at cs.pomona.edu
Thu Nov 18 09:17:01 PST 2010
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
Kim
On Nov 18, 2010, at 3:08 AM, James Noble wrote:
>> I don't see this as a strong argument against it. There are two possible meanings of const (reference or object is const).
>
> Right. I think we want both meanings - and probably different terms for each meaning.
> I think I'm getting used to "field/const" for instance scope and "var/const" for local scope -
> although the field vs var distinction seems arbitrary. But "field" seems to work better with
> "method" than "var" does.
>
>> The difference has to be understood by learners whatever it is called. In our case only the reference is const -- I don't think that naming it const detracts from the understanding. Naming it somethign different only because the object isn't certainly doesn't seem to make it clearer (just more obscure).
>
> hmm, well. I think the names are in general arbitrary, but we can try to get a good scheme
> anyway. Introducing methods with a "method" keyword and fields with a "field" keyword
> hopefully seems more straightforward than it actually is :-)
>
> The term I want for value objects (immutable) is "value". (This is further down the queue)
>
>> In my head, you're right: this is unpopular... :-)
>
> there's still a question of whether consts are *initialised* with = or :=
>
> J
> _______________________________________________
> Grace-core mailing list
> Grace-core at cecs.pdx.edu
> https://mailhost.cecs.pdx.edu/mailman/listinfo/grace-core
More information about the Grace-core
mailing list