package and virtual
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Thu Mar 1 09:43:44 PST 2012
On 3/1/12 10:12 AM, Alex Rønne Petersen wrote:
> On 01-03-2012 11:12, deadalnix wrote:
>> Le 01/03/2012 01:53, Jonathan M Davis a écrit :
>>> package functions are currenly non-virtual.
>>>
>>> The spec claims that "all non-static non-private non-template
>>> member func
>>> tions are virtual," which would mean that package is supposed to be
>>> virtual.
>>> But from what I recall, the plan is to leave package as non-virtual.
>>> So, is
>>> that indeed the case and the spec needs to be fixed, or is package
>>> going to be
>>> made virtual at some point?
>>>
>>> - Jonathan M Davis
>>
>> I think virtuality and package should have nothing to with one another.
>> package is supposed ot express visibility, not change behavior.
>
> 100% agree.
Same here, though importantly the compiler can use the information to
optimize away virtuals that cannot be overridden.
Andrei
More information about the Digitalmars-d
mailing list