new DIP47: Outlining member functions of aggregates
Peter Williams
pwil3058 at bigpond.net.au
Sat Sep 7 23:08:33 PDT 2013
On 08/09/13 15:40, Walter Bright wrote:
> On 9/7/2013 9:46 PM, Jonathan M Davis wrote:
>> On an implementation note, I don't think that #5 is strong enough. I
>> think
>> that it should be an outright error if there is a difference between the
>> declaration and definition rather than giving one precedence over the
>> other.
>
> I'll point out that C++ has equivalent behavior, and it has not resulted
> in any complaints I've ever heard. When you outline a C++ member
> function, you do not need to add 'static', 'private', 'virtual', and in
> fact you cannot add the latter two.
Here's one. It's one of the things that I don't like about C/C++ as it
doubles the work required in code maintenance. One of the things that I
like about D is that forward references aren't required and this seems
to me to be introducing a feature that was only ever in C/C++ to make
forward references possible (which is why I tolerated it).
In summary, you've gotten rid of the need for this type of duplication
so why would you introduce it?
Peter
More information about the Digitalmars-d
mailing list