David Nadlinger wrote:
Which is wrong as long as you don't do link-time optimization, and DMD probably won't in the foreseeable future.
Are GDC and LDC limited by DMD in this regard? I know LDC has a LTO flag.
If GDC/LDC supports LTO and/or DMD will in the eventual future, then I think defaulting to final is best. If you're saying that even with LTO you wouldn't be able to do automatic de-virtualization ever, then I think Manu might be right in saying the model is backwards. I don't know enough about LTO to comment either way though.
FeepingCreature wrote:
class Foo : Bar final { } as alternative syntax for class Foo : Bar { final { } }Advantages: internally consistent, no need for completely new syntax, "final class" can be deprecated (it never worked well anyway).Alternate aspects of this syntax change: void foo(ObjectThing ot, int a, int b) with (ot) { } void bar() synchronized { }
+1 This syntax makes a lot of sense.
