[NOTABLE PR] First step from traditional to generic runtime

Adam D. Ruppe via Digitalmars-d digitalmars-d at puremagic.com
Thu Mar 2 19:06:49 PST 2017


On Friday, 3 March 2017 at 02:59:57 UTC, rikki cattermole wrote:
> If we end up full on templated TypeInfo that would be lovely.
>
> TypeInfo_Class clasz = TypeInfo_ClassT!Foo;
>
> class TypeInfo_ClassT(T) if(is(T == class)) {
> 	version(FullReflection) {
> 		string[] methodNames() { ... }
> 	}
> }


We already have the capability to do that with the existing dmd 
and druntime - RTInfo is a template instantiated for each type, 
linked into TypeInfo, so we can extend it... if we are willing to 
edit object.d.

What is really nice about templating TypeInfo though is removing 
some annoying code from druntime and also being able to tweak 
that in constrained environments.... we can already add anything 
we want, being able to *remove* is what's going to be new.


More information about the Digitalmars-d mailing list