Struct Constructors

Mark Blume via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jun 16 15:04:23 PDT 2014


On Monday, 16 June 2014 at 22:03:28 UTC, Mark Blume wrote:
> Why exactly isn't a constructor without any parameters is not 
> allowed?
> Why does
> "Struct()" calls "Struct.opCall()," which means "Struct.init" 
> initially,
> while
> "Struct(params)" calls "Struct.this(params)?"
>
> Does "Struct(params)" also call "Struct.opCall(params)?"
>
> I am new to D and I can't seem to understand this.

I should also say that I checked out the documentation already,
but there is not an actual explanation there.


More information about the Digitalmars-d-learn mailing list