DIP 1014
Shachar Shemesh
shachar at weka.io
Thu Oct 4 12:08:38 UTC 2018
On 04/10/18 13:43, Stanislav Blinov wrote:
>> * move the data as part of the call hook rather than before
>> * Use a different name and signature on the hook function
>
> Yes, exactly.
>
>
> It would have to be special if you don't want to leave room for the
> compiler implementors.
That's not how standards work. If you don't want compiler implementors
to have a choice in the matter, you put MUST in the specs. Doing
anything else is, by and large, considered harmful.
> The calling convention for particular types (i.e.
> those that do have a move hook defined) would have to be enforced in
> some way. See the neighbor thread wrt move semantics by kinke.
Two distinct things. Kinke was talking about how to pass a struct
through the ABI. You are talking about special-casing a specific name.
Not to mention, your special case is to transform it to something you
can *already* specify in the language. Why?
> Which is, however, not a reason to formalize it and make it a
> requirement for an isolated specific case, such as this one, utilizing a
> syntax that is currently not used by the language.
There is positively nothing in DIP 1014 that is "syntax not used by the
language". Quite the contrary.
> As opposed to trying
> to fit existing language semantics to something that the language didn't
> seem to want to allow in the first place.
Formalize it as a suggestion, and we can discuss the "as opposed to".
Like I said, I think there's a lot you're glossing over here (such as
backwards compatibility).
Shachar
More information about the Digitalmars-d
mailing list