list literal gotcha and suggestion
mthornton at optrak.co.uk
Thu Oct 1 13:21:20 PDT 2009
Neal Gafter wrote:
> I think it was intended that the expressions in these literals not be constrained to be constants.
I did read the original proposal first and that does restrict them to
compile time constants. Possible extension to non constant elements is
also mentioned and clearly could not be done with my suggestion. Or
perhaps we could just say that if any elements are not constants then
the result is always a List.
[1, 2, 3] implements List and Set
[1, 2, 1] implements List
[x] implements List
 is an empty List and Set
More information about the coin-dev