D features

Rishat Galiulin rishatgaliulin at mail.ru
Tue Sep 20 12:58:06 PDT 2011


I'm newbie to D, but I've been wondered by its features.

I have some questions about D2 and its standard library :
1) Why is "Object.factory(string classname)" not allowing to create objects without default constructor, for example:
     ubyte[] array = new ubyte[10];
     MyClass my = Object.factory("MyClass",  array);
2) Why D not using functions exceptions specification list like Java? If this promotes bad programming style to newbies, may be better at least to create compilation warnings?

With best regards, Rishat Galiulin.


More information about the Digitalmars-d mailing list