Time for std.reflection

Wouter Verhelst wouter at grep.be
Sun Jul 22 10:53:45 PDT 2012


"Kagamin" <spam at here.lot> writes:

> On Sunday, 22 July 2012 at 14:28:45 UTC, Andrei Alexandrescu wrote:
>> Yah, ideally all entities definable in a D module should be
>> available via reflection. But I focused on things that e.g. the user
>> of a dynamically-loaded library would be interested in: functions,
>> classes.
>
> Plugins are usually done by providing factory methods that create
> needed objects, the methods are usually obtained with dlsym.

That's what you'd do in a language that doesn't have something like D's
Object.factory(). In D's case, however, you'd have the "factory method"
be the ctor.

That's all hypothetical, however, since there's no D ABI for shared
objects yet...

-- 
The volume of a pizza of thickness a and radius z can be described by
the following formula:

pi zz a


More information about the Digitalmars-d mailing list