Open Methods: From C++ to D

Jean-Louis Leroy via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Mon Aug 28 13:06:00 PDT 2017


On Monday, 28 August 2017 at 12:31:20 UTC, rikki cattermole wrote:
> On 28/08/2017 1:19 PM, Mike Parker wrote:
>> Jean-Louis Leroy posted about his open methods library here in 
>> the forums some time ago. Now, he's written a blog post that 
>> explains what open methods are, and describes the D 
>> implementation and how it compares to his C++ library.
>> 
>> The blog:
>> https://dlang.org/blog/2017/08/28/open-methods-from-c-to-d/
>> 
>> Reddit:
>> https://www.reddit.com/r/programming/comments/6wj0ev/open_methods_from_c_to_d/
>
> Neat. Good to see articles in support of TypeInfo/ClassInfo!
> I do wish we extended it for full reflection capabilities 
> though...

Agreed.

Andrei suggested using rtlInfo but AFAICT this requires building 
a custom druntime. It would be easy to support this method in 
addition to 'deallocator' and 'hash' but I suspect it would not 
be a very popular option.

Maybe we could have a void*[] in TypeInfo and a global integer 
index that extensions could use to allocate entries?



More information about the Digitalmars-d-announce mailing list