[Grace-core] Edited Variable & Constant page
James Noble
kjx at ecs.vuw.ac.nz
Thu Nov 18 03:08:37 PST 2010
> 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
More information about the Grace-core
mailing list