Why I (Still) Won't Use D

bearophile bearophileHUGS at lycos.com
Thu Mar 27 13:06:50 PDT 2008


e-t172:
> We are talking about builtin language features here, IMHO saying "you 
> can write a class/template for that" is a little off point.

The most common data structures can be built-in, while the less common (or the ones that don't need a special syntax) can be in the std lib. A third type of built-in array is overkill, because I think that (given the other two) it's not necessary often enough (its advantages are little, and you can import a class/struct with good operator overloading that has a good enough syntax), while I think built in set and "packed list" can be more useful.
But I agree that abstract interfaces too can be useful (so you can define the idea of something iterable, something that acts as an associative array, something that acts as a set, etc and then you can create a function that takes as input something that for example conforms to the iterable semantics plus the associative array semantics, despite not being a built-in AA).

Bye,
bearophile



More information about the Digitalmars-d mailing list