Disable GC entirely

Manu turkeyman at gmail.com
Tue Apr 9 09:48:51 PDT 2013


On 10 April 2013 00:50, Dmitry Olshansky <dmitry.olsh at gmail.com> wrote:

> 09-Apr-2013 14:18, Manu пишет:
>
>> On 9 April 2013 13:09, Rob T <alanb at ucora.com <mailto:alanb at ucora.com>>
>>
>> wrote:
>>
>>     On Monday, 8 April 2013 at 08:21:06 UTC, Manu wrote:
>>
>>
>>         The C++ state hasn't changed though. We still avoid virtual
>>         calls like the
>>         plague.
>>         One of my biggest design gripes with D, hands down, is that
>>         functions are
>>         virtual by default. I believe this is a critical mistake, and
>>         the biggest
>>         one in the language by far.
>>
>>
>>     My understanding of this is that while all of your class functions
>>     will be virtual by default, the compiler will reduce them to
>>     non-virtual unless you actually override them, and to override by
>>     mistake is difficult because you have to specify the "override"
>>     keyword to avoid a compiler error.
>>
>>
>> Thus successfully eliminating non-open-source libraries from D...
>> Making a dependency on WPO is a big mistake.
>>
>>
> final class Foo{ //no inheritance
> final: //no virtuals
> ...
> }
>
> 2 extra words and you are done. The only problem I see is that there is no
> way to "undo" final on a few methods later...


Yes, it can not be un-done. And any junior/tired/forgetful programmer will
accidentally write slow code all over the place, and nobody will ever have
any idea that they've done it. It's very dangerous.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130410/036c4495/attachment.html>


More information about the Digitalmars-d mailing list