Idea to verify virtual/final methods

Adam D. Ruppe destructionator at gmail.com
Tue Jun 4 07:04:20 PDT 2013


Though a downside here is you can't require a check attribute to 
be present on a class without modifying druntime. The class 
attribute could go down and check its members, but there's no way 
to error on an unchecked class without changing object.d, or at 
least a runtime check to loop through the modules and check it 
then.

It just checks ones that are there, and at that point, it isn't 
really that much different than just writing static 
assert(test.sizeof < 8); right there in the module.

so maybe not as awesome as i first thought, but still, this is an 
exciting technique and I'm sure there's more we can do with it.


More information about the Digitalmars-d mailing list