[Issue 5217] New: Permit static+abstract
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Nov 14 12:42:23 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5217
Summary: Permit static+abstract
Product: D
Version: D2
Platform: All
OS/Version: Windows
Status: NEW
Severity: enhancement
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: ah08010-d at yahoo.com
--- Comment #0 from Austin Hastings <ah08010-d at yahoo.com> 2010-11-14 12:41:13 PST ---
The abstract keyword currently cannot be used with "non virtual" functions.
IMO, this is an error.
Non-virtual simply means that only one layer of implementation will be possible
- since a vtable would be required to disambiguate multiple layers. It does not
mean that the implementation is automatically obvious, nor does it mean that
multiple layers of interfaces cannot be composed into the single layer of
implementation.
Factory methods, for example, are usually static. And in the presence of
templates, the expectation should be for a high degree of fan-out, but not much
depth. (That is, a template can be realized with many type parameters, but is
less likely to be stacked up in a deep inheritance tree, although it does
happen.)
Thus, I would very much like to be able to require a static method, via the
abstract keyword.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list