list literal gotcha and suggestion

Per Bothner per at bothner.com
Wed Oct 7 17:32:26 PDT 2009


On 10/07/2009 05:24 PM, Reinier Zwitserloot wrote:
> We covered this; in other (popular) languages, {} refers to set
> literals and [] refers to list literals.
>
> Either way you're going to confuse people.

It is more important to be internally consistent than consistent
with other languages.  In in Java {} is used for array-literals,
which are conceptually closer to list literals.  Perhaps one
day arrays will (finally) implement java.util.List, which IMO
argues strongly for using {} for list literals.
-- 
	--Per Bothner
per at bothner.com   http://per.bothner.com/



More information about the coin-dev mailing list