[sv-ec] Mantis 1584 - defaults for virtual methods

From: Gordon Vreugdenhil <gordonv_at_.....>
Date: Tue Nov 20 2007 - 13:54:26 PST
All,

As a group, EC has yet to come to a definite conclusion on how
to handle defaults in virtual method overrides.

There are four choices that I think make sense:
   1) disallow defaults in an override
   2) ignore defaults in an override
   3) use the defaults based on the static type of the object reference
   4) use the defaults based on the actual type of the object


I think that previous discussion indicated some preference for (1).
Given the current LRM text, I think that (2) is more compatible
in that the absence or presence of a default could have a semantic
difference from current code but would be structurally compatible.
Either (3) or (4) is defensible based on the current LRM text.

Can we come to consensus on this?  If so, I'd be willing to
write up a proposal.

I have a preference for (2), would accept (3) or (4), and
would likely be slightly opposed to (1) due to compatibility
concerns (unless defaults in overrides use was just deprecated
rather than completely removed).  Between (3) and (4) there are
interesting philosophical questions about designers versus users
of a class, but after consideration I would likely prefer (3)
over (4) in that space.

Gord.
-- 
--------------------------------------------------------------------
Gordon Vreugdenhil                                503-685-0808
Model Technology (Mentor Graphics)                gordonv@model.com


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Nov 20 13:55:23 2007

This archive was generated by hypermail 2.1.8 : Tue Nov 20 2007 - 13:55:54 PST