[Grace-core] minor language issues
James Noble
kjx at ecs.vuw.ac.nz
Tue May 26 01:01:52 PDT 2015
> Minigrace does not do this.
well I thought something did at some time;
(I probably didn’t like it then).
>> we could give up on indexing (which many of you have reached already) which resolves this...
> Or you can use parentheses to pass arbitrary expressions as arguments,
> which seems to be the missing case nobody is talking about...
so that would be
list.empty
list.with([])
list.with([1, 2, 3])
list.with([1, 2, 3], [4, 5, 6])
hmm. In many ways, I guess typing “([“ and “])” for list arguments is no worse than other options (e.g. [[ ]])
list.empty
list.with [[]]
list.with [[ 1, 2, 3 ]]
list.with([[1, 2, 3 ]], [[ 4, 5, 6 ]])
part of me says: [] reserved for indexing, other bracket ops for literals, so they are syntactically distinct.
I guess we could try to ask questions of corpora like: how many different indexing ops would objects need?
how many different matchfix brackets would dialects need?
I suppose Smalltalk can tell us how many array literals there are vs calls to at: and at: put:
James
More information about the Grace-core
mailing list