DMD 0.177 release
Jarrett Billingsley
kb3ctd2 at yahoo.com
Wed Dec 13 09:02:37 PST 2006
"Walter Bright" <newshound at digitalmars.com> wrote in message
news:elnv14$r2d$1 at digitaldaemon.com...
> For whatever the merits of opCall vs this(), efficiency is NOT a problem
> with either, and is not a reason to choose one or the other. The generated
> code is the same.
>
> Under the hood, they are the same. Both take a hidden pointer to where the
> result is stored. The rest is window dressing.
Alright then. All I've got then is the orthogonality argument. But you
won't listen to that either.
People will come to D from C++ and C# and ask "where are constructors in
structs?" and we'll say "you have to use static opCall." And they'll ask
"why?" And all we'll be able to do is shake our heads, sigh, and say "I
don't know."
For the last time, even though you don't care: we have been using static
opCall as a WORKAROUND. As in *we never intended for that to be the
canonical method of constructing a struct*. I don't think anyone would
complain if they were given a consistent, logical method of initializing any
aggregate type.
More information about the Digitalmars-d-announce
mailing list