Interesting Research Paper on Constructors in OO Languages

eles eles at eles.com
Wed Jul 17 14:59:11 PDT 2013


On Wednesday, 17 July 2013 at 21:42:16 UTC, H. S. Teoh wrote:
> On Wed, Jul 17, 2013 at 11:19:21PM +0200, w0rp wrote:

This is how it is done in Ecere SDK and the eC language:

"However, constructors particularly do not play a role a
important as in C++, for example. Neither constructors nor 
destructors
can take in any parameters, and only a single one of each can be
defined within a class."

"Instead, members can be directly assigned a
value through the instantiation syntax initializers (either 
through the
data members, or the properties which we will describe in next
chapter)."

"They cannot be specified a return type either. A constructor
should never fail, but returning false(they have an implicit bool
return type) will result in a the object instantiated to be null."



More information about the Digitalmars-d mailing list