Slow performance compared to C++, ideas?
Nicolas Guillemot
nlguillemot at gmail.com
Fri May 31 13:00:40 PDT 2013
On Friday, 31 May 2013 at 19:17:05 UTC, Sean Cavanaugh wrote:
> On 5/31/2013 4:42 AM, Manu wrote:
>>
>> People already have to type 'override' in every derived class,
>> and
>> they're happy to do that. Requiring to type 'virtual' in the
>> base is
>> hardly an inconvenience by contrast. Actually, it's quite
>> orthogonal.
>> D tends to prefer being explicit. Why bend the rules in this
>> case,
>> especially considering the counterpart (override) is expected
>> to be
>> explicit? Surely both being explicit is what people would
>> expect?
>>
>
> Maybe the solution is to make everyone equally unhappy:
>
> all (non constructor) class methods must be either final,
> override, or virtual, if you leave one of these off, you get an
> error :)
Might not be so bad
class Foo {
final:
foo();
boo();
override:
fun();
kun();
virtual:
baz();
bar();
}
More information about the Digitalmars-d
mailing list