www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16371] New: warn/deprecate implicit final in interfaces

https://issues.dlang.org/show_bug.cgi?id=16371

          Issue ID: 16371
           Summary: warn/deprecate implicit final in interfaces
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: spec
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: lodovico giaretart.net

Currently templated functions are allowed in interfaces (are them? [1]) and are
implicitly marked final. This may be counter-intuitive for new-comers.

As final functions in interfaces are not that usual (as interfaces are meant
for inheritance), it would ease readibility to oblige the use of explicit final
in interfaces.

So I propose the deprecation and then removal or implicit final in templated
interface functions.

[1] https://issues.dlang.org/show_bug.cgi?id=16370

--
Aug 10 2016