Optional monitors suggestion

bearophile via Digitalmars-d digitalmars-d at puremagic.com
Wed May 14 04:14:46 PDT 2014


Yuriy:

> 2. class may be defined with @__monitor attribute, in which 
> case a __monitor variable will be added to it's beginning.

I suggest a name like "@monitor". The is no need for the 
underscores.


> 3. Subclass of such class may again be defined with @__monitor 
> attar, in which case it will be simply ignored, as it already 
> inherits __monitor from super.

A more tidy design could require the @monitor in all classes that 
inherit from a @monitor-annotated class. But this also looks a 
little overkill. So let's hear what other people think about this.

Bye,
bearophile


More information about the Digitalmars-d mailing list