std.container update

Leandro Lucarella llucax at
Thu May 27 18:42:39 PDT 2010

Andrei Alexandrescu, el 27 de mayo a las 20:06 me escribiste:
> On 05/27/2010 06:28 PM, Jonathan M Davis wrote:
> >I take it that Array is basically supposed to be std.container's version of
> >C++'s vector or Java's ArrayList? If so, I would suggest that Array is not
> >the best of names in that it would become very easy to confuse it with
> >built-in arrays when discussing them (particularly in verbal communication
> >where you can't see the capital A). Personally, I would have just gone with
> >Vector, since it's a fairly standard name for that sort of container and
> >wouldn't be confused with anything else. If you really want Array, that's
> >fine - it should be clear enough when it's in code - but I would think that
> >talking about it could easily be confusing enough that it wouldn't be the
> >best of names.
> >
> >- Jonathan M Davis
> Good point. Other opinions?

I always thought vector was a bad name choice in C++, I had that word
associated with what C++ calls a valarray (a physics vector).

I agree that Array is too generic for D, though, and unfortunately I don't
have a better suggestion, but you asked for other opinions ;)

BTW, what would be the point of an array/vector when you have built-in
arrays? If built-in arrays would be syntax sugar for a real library type,
like AAs, I can see as a good option using Array for that type, since
built-in arrays and the library Array would be the same thing.

Leandro Lucarella (AKA luca)           
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
	-- Crónica TV

More information about the Digitalmars-d mailing list