[Issue 2946] Make 'abstract' mandatory if the class is intended to be abstract

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jan 20 12:26:16 PST 2013


http://d.puremagic.com/issues/show_bug.cgi?id=2946


Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |andrej.mitrovich at gmail.com
           Platform|x86                         |All
         Resolution|                            |WONTFIX


--- Comment #8 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-01-20 12:26:13 PST ---
I don't think this will fly. Abstract on the class name itself makes it
non-instantiable, however subclasses are not abstract and can be instantiated:

// can't be instantiated
abstract class Foo { void foo() { } }  

// is not abstract and can be instantiated
class Bar : Foo { }

Whether or not there's an abstract keyword next to the class name doesn't tell
you whether the class actually has abstract methods, so there's no benefit
forcing you to add 'abstract' to the name.

-- 
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