A summary of D's design principles

Sclytrack sclytrack at fake.com
Wed Sep 29 05:39:25 PDT 2010


> nobody gets pissed off and defensive when he compares D unfavorably to
> Python.
> > No matter what I say, I'm always wrong. Even quotes from encyclopedias or
> > research papers are more wrong when I share them.


Compile-time custom annotation might be hard to implement. Do we really need it?
Going from compile-time to runtime might not be obvious too.


class MarkThis : CustomAnnotation
{

}

class A
{
   @MarkThis("test",10)
   void test()
   {
          //MarkThis obj = (MarkThis) getCustomAnnotation( ... ); //at runtime
          //even invoke methods of the annotation.
   }
}

Method test <--linked to-->  annotation MarkThis and parameters ("test", 10)







More information about the Digitalmars-d mailing list