Coolest D features
janderson
askme at me.com
Thu Jan 4 22:45:47 PST 2007
Andrei Alexandrescu (See Website For Email) wrote:
> Say you wanted to introduce a programmer friend to D. She might know one
> of D's sibling languages (Java, C, C++, or C#), but you shouldn't rely
> too much on that. What features of D would you describe first to hook
> that friend in?
>
> Andrei
Let me put it this way. I was coding in C# the other day and I was so
frustrated with the arrays. They are not standardized. There seems to
be about 10 different ways to specifying arrays (note that I'm including
net).
Some use count and others use length. Some are fixed size and others
arn't. Some can be allocated at a particular size on the fly but then
you can't change it without creating a brand new array. It took my an
hour to work out how to convert an ArrayList to an ViewItem[] list
because it uses a completely un-logical mechanism.
Also most net classes still haven't adopted templates so your left with
these horrible un-typesafe objects which you can only figure out at run
time (if your lucky). Granted D doesn't even have anything like net,
but I doubt it will be anywhere near as bad with standardized arrays.
std in C++ is better but u still get the same problem as many libs what
to implement there own type.
-Joel
More information about the Digitalmars-d
mailing list