[Grace-core] Typing Collections

James Noble kjx at ecs.vuw.ac.nz
Tue Jul 15 23:09:18 PDT 2014


>     def oneToFive = list.with<Number>(1, 2, 3, 4, 5)

this is what I'd expect, or the dotless alternative list<Number>(1, 2, 3, 4, 5)

> If we keep the extra compelexity of type parameters, I want a payoff — the payoff being, in this case, that typed and untyped programs differ only in the presence of
> their types.

right.  That indeed is the only justification for keeping separate type parameter syntax.

> Previously, I argued for getting rid of type parameters as a special case and just using ordinary method parameters

yep, that doesn't work with ordinary method paramemters.
if we adopted some version of "generalised requests" that had optional name+parameter parts
then those types could be ordinary optional method parameters
https://projects.cecs.pdx.edu:8443/~black/NewOOL/index.cgi/wiki/GeneralisedMessages

James, sporadically



(because I'm still wondering, here's that in the [[ ]] syntax)

> def oneToFive = list.with[[Number]](1, 2, 3, 4, 5)

> list[[Number]](1, 2, 3, 4, 5)

Hmmm. 


More information about the Grace-core mailing list