Why I (Still) Won't Use D
Michiel Helvensteijn
nomail at please.com
Thu Mar 27 12:56:13 PDT 2008
Benji Smith wrote:
> The built-in collection of types should include types with only one
> sensible implementation. A fixed-size list has only one sensible
> implementation: an array. So it makes sense for it to built in.
>
> That's why I think the other types would be more at home in a library.
Now that you mention it, I've been thinking about that as well. I know what
you mean.
However, we also want the syntactic sugar for maps and dynamic arrays. int[]
is just so much prettier than vector!(int).
So why not allow a library to define what an int[] or int[T] means? This
would only work, however, if:
* No clashing implementations can be imported at the same time. (Just like
two classes with the same name can't coexist.)
* There is a default implementation for which you need no imports.
--
Michiel
More information about the Digitalmars-d
mailing list