Open Methods: From C++ to D

rikki cattermole via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Mon Aug 28 17:56:32 PDT 2017


On 28/08/2017 9:06 PM, Jean-Louis Leroy wrote:
> 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?

Instead of hacking new features in, we should work on a full redesign.
Clearly its needed between TypeInfo not cross the dll boundary on 
Windows (yay no classes!), -betterC and of course full reflection that 
we can do significantly better in this department.



More information about the Digitalmars-d-announce mailing list