If you had money to place for a bounty, what would you choose?
Dejan Lekic
dejan.lekic at gmail.com
Tue Dec 3 10:10:41 PST 2013
On Monday, 2 December 2013 at 12:19:12 UTC, Manu wrote:
> On 2 December 2013 19:33, Dejan Lekic <dejan.lekic at gmail.com>
> wrote:
>
>> On Friday, 29 November 2013 at 13:44:10 UTC, Manu wrote:
>>
>>> * ARC
>>> * rvalue -> ref
>>> * virtual-by-default
>>> * GC improvements
>>> * AA fixes
>>>
>>>
>>> On 29 November 2013 07:01, Fra <Fra at b.it> wrote:
>>>
>>> Personally I would love to see this old issue finally
>>> implemented/fixed:
>>>> There can be only one alias this.
>>>> https://d.puremagic.com/issues/show_bug.cgi?id=6083
>>>>
>>>> What would your choice be?
>>>>
>>>
>> I hope virtual-by-default never gets approved. I read DIP51
>> and quite
>> frankly I am not convinced at all. It is basically "I do not
>> want to put
>> final in front of my methods. Well, I do not want to put
>> virtual in front
>> of my methods... But this is perhaps something for another
>> discussion...
>>
>
> There's been endless discussions on the topic. There was a link
> to a thread
> with loads of discussion.
> The problem is that virtual is irrevocable. It can't be removed
> without
> breaking the API, which means it's not possible to optimise a
> library in
> that way at any time after it has already been released to the
> wild. The
> converse is not true.
> It has also been agreed that there is very little the
> compiler/optimiser
> can do to help.
> It's a dangerous default, it's got absolutely nothing to do
> with "I don't
> want to type final" as you helpfully simplified it. You can
> type 'virtual:'
> at the top, and you're set. Again, the converse doesn't stand,
> you can't
> practically type 'final:' at the top since there will
> inevitable by SOME
> virtual methods.
>
> We can spin off another thread if you like, or you can read
> through the old
> ones. I don't think it's going to go any further than the other
> threads
> already did.
No offense, so far I haven's seen a GOOD reason for making final
to be the default. Your DIP51 is, to put mildly, pretty
subjective. You care about performance, I get it, but I do not.
Developers like me use classes exactly because methods are
virtual. In my career I *rarely* had situation that I knew ahead
my class method is *definitely* final.
You say "dangerous". - I am quite sure people are aware of those
"dangers".
You say "people agreed". Who agreed? :)
You say there have been endless discussions. Yes, I remember them
but I do not remember anything conclusive after reading them.
This is *a radical change*, and instead of "(unknown) people
agreed" the community deserves a better explanation why are we
switching to final as default storage class...
More information about the Digitalmars-d
mailing list