Do classes require explicit constructors?
Richard (Rikki) Andrew Cattermole
richard at cattermole.co.nz
Sat Feb 14 15:45:20 UTC 2026
On 15/02/2026 4:42 AM, Brother Bill wrote:
> Is this expected behavior, that is, we always need to create our
> constructors, no free constructor is built for us by the D compiler?
Yes currently.
> If so, this is a clear departure from C# and Eiffel, where one gets a
> free constructor if no explicitly declared constructors.
D's classes were based off of Java's.
I want some changes to them, constructors also don't inherit.
They are massive pain for exceptions.
More information about the Digitalmars-d-learn
mailing list