On 07.03.19 11:38, spir wrote:
-1- How to enforce that subclasses implement given methods without using
"abstract", which seems to make the whole class abstract?
Not, as far as I can tell. You can't force derived classes to override
an existing implementation. And you can't omit the implementa
Am 07.03.19 um 11:38 schrieb spir:
> Hello,
>
> First, I am not very experimented with the combination of static lang
> (alloc & typing) and OO (class-based). I'm implementing a library for
> lexical analysis (lexing), with 2 minor issues:
>
> -1- How to enforce that subclasses implement given me
from [https://dlang.org/spec/attribute.html#abstract] :
---
abstract Attribute
An abstract member function must be overridden by a derived class. Only virtual
member functions may be declared abstract; non-virtual member functions and
free-standing functions cannot be declared abstract