Thread overview
[Issue 2946] Make 'abstract' mandatory if the class is intended to be abstract
Jul 18, 2014
Denis Shelomovskij
May 16, 2018
Dmitry Olshansky
Dec 17, 2022
Iain Buclaw
July 18, 2014
https://issues.dlang.org/show_bug.cgi?id=2946

Denis Shelomovskij <verylonglogin.reg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |verylonglogin.reg@gmail.com

--- Comment #13 from Denis Shelomovskij <verylonglogin.reg@gmail.com> ---
1. Currently `abstract` in required if not all `interface` methods are implemented or overridden with an `abstract` method:
---
interface I { void f(); }

abstract class CI1: I { } // `abstract` required
abstract class CI2: CI1 {  } // `abstract` required too

class B { abstract void f(); }
class CB: B {  } // derived as `abstract`

class CI3: I { abstract void f(); }
class CI4: CI3 {  } // derived as `abstract` too
---
This difference looks inconsistent.

2. When one sees a class `C` and want to understand whether or not it is abstract he has to look through every ancestor of `C` to determine whether it contains an `abstract` method unimplemented further. And it's really hard. IMO it would be much better if class declaration clearly shows whether it's abstract or not.

3. Currently a compiler prints what methods are unimplemented if one tries to create an abstract class instance so this isn't a critical issue, just a bad looking thing in a language (IMHO).

--
June 09, 2015
https://issues.dlang.org/show_bug.cgi?id=2946

Andrei Alexandrescu <andrei@erdani.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|unspecified                 |D2

--
May 16, 2018
https://issues.dlang.org/show_bug.cgi?id=2946

Dmitry Olshansky <dmitry.olsh@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |bootcamp
                 CC|                            |dmitry.olsh@gmail.com

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=2946

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4

--