Qt bindings for D

Abdulhaq alynch4047 at gmail.com
Wed Oct 16 04:32:53 PDT 2013


On Tuesday, 15 October 2013 at 09:38:15 UTC, Max Samukha wrote:
> On Monday, 14 October 2013 at 09:45:18 UTC, Abdulhaq wrote:
>>>
>>> I recommend to dump it and start from scratch. A clang-based 
>>> generator would be an interesting option to explore. Or, if 
>>> you want to preserve your sanity, just write Qt applications 
>>> in C++/QML.
>>
>> Hi Max, so why dump it? I can see a few reasons why you might
>> propose that:
>>
>> 1) You think it's a dead end because QtJambi is dead, so it 
>> would
>> be problematic to move it forward with new versions of Qt
>
> That is one reason. Also, QtJambi is based on a limited and 
> outdated C++ parser, and we had problems getting necessary 
> information from it. When Qt moves to C++11, the situation will 
> get worse. So I think it is reasonable to switch to clang soon.
>

OK I see (unfortunately !)

> Long story short, D allows for two approaches to bindings like 
> QtD:
>
> 1. The traditional one is to allocate "shells" on GC heap and 
> have a set of manually specified rules for ownership transfers 
> and reference count adjustments.
> 2. The other is more interesting - abandon the idea of 
> reference/ownership annotations and go with semi-automatic 
> memory management as it is in Qt, with no reliance on the GC.
>
> At some point I wanted to switch to 2 completely, so QtD is 
> somewhere between 1 and 2, quite a mess.

I did notice when in the code that it was partially in a 
transitional state - now I know what you were doing!

I have to confess that in the light of this and some of your 
other posts, the siren call of 'start again' is singing in my ear.


More information about the Digitalmars-d mailing list