[NOTABLE PR] First step from traditional to generic runtime

rikki cattermole via Digitalmars-d digitalmars-d at puremagic.com
Thu Mar 2 18:59:57 PST 2017


On 03/03/2017 8:32 AM, Andrei Alexandrescu wrote:
> Worth a look: https://github.com/dlang/druntime/pull/1781. This moves
> comparison code away from tedious runtime-introspected routines to nice
> templates. -- Andrei

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() { ... }
	}
}

But just a thought.


More information about the Digitalmars-d mailing list