Hitchikers Guide to Porting Phobos / D Runtime to other architectures

Jacob Carlborg doob at me.com
Tue Jan 7 04:42:14 PST 2014


On 2014-01-07 09:20, Mike wrote:

> I think it's OK to emit code that is not used, as long as the linker can
> safely strip it out if it can't find a path to it.

With the ModuleInfo and ClassInfo you can do some form of runtime 
reflection:

auto foo = Object.create("bar.Foo");

How would the compiler know that bar.Foo is actually used anywhere in 
the code?

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list