Can I call the default opAssign after overloading opAssign?

Rob T rob at ucora.com
Mon Nov 19 12:19:34 PST 2012


On Monday, 19 November 2012 at 09:37:35 UTC, Jonathan M Davis 
wrote:
> On Monday, November 19, 2012 10:29:21 Rob T wrote:
>> the D language specification (which is currently MIA).
>
> The online documentation _is_ the official spec, though it 
> definitely doesn't
> have enough detail to be unambiguous, and in some cases, it's 
> not properly up-
> to-date.
>
> - Jonathan M Davis

Well yes, there is a spec, and it's pretty good in some areas, 
but also just not precise enough in other areas, such with what 
we're discussing in here. I'd like to see the mechanism 
surrounding the copy/move semantics described in full details as 
a part of the language spec, otherwise it's a bit risky to rely 
on these behaviors if they are only considered as compiler 
optimizations.

I know that Walter started D from the POV of a compiler 
developer, so he probably does consider the optimizations to be a 
part of the spec, but I'd like to see that in writing somewhere 
to make it rock-solid official. There's mention of this in the 
TDPL but again it's written as being an optimization, although 
you could also get the impression is is a language feature, but 
it's not exactly clear.

Note that I'm picking on this topic because it's a foundation 
just about everything else it built up on, so it really needs to 
be thoroughly documented as part of the spec.

--rt


More information about the Digitalmars-d-learn mailing list