Dub and GtkD

Mike Wey mike-wey at example.com
Mon Dec 23 10:30:21 PST 2013


On 12/22/2013 10:00 PM, Artur Skawina wrote:
> On 12/22/13 20:21, Mike Wey wrote:
>> On 12/22/2013 03:36 PM, Russel Winder wrote:
>>>
>>> Python now uses the reflection approach to providing a Python binding to
>>> the API: PyGTK has given way to PyGobject. Has the PyGobject approach
>>> been rejected for GtkD staying with the PyGtk approach?
>>
>> I don't think that would be a good approach with D, you either need a whole lot of compile time magic, or loose type safety and do everything at runtime.
>
> It's not that bad; no compile time magic and zero runtime overhead is
> possible: http://repo.or.cz/w/girtod.git/tree/gtk2:/gtk2
>
> While I haven't updated those bindings  in ~2 two years, they should
> still work; may just need some tweaks, to deal with recent d language
> changes and to support newer lib features. The biggest remaining issue
> is lack of integrated Cairo bindings.
>
> artur
>

Those are generated from the gir files beforehand like GtkD is generated 
from the documentation (Moving to a gir based generator is on the TODO 
list, but time currently doesn't permit it). While with the PyGobject 
approach the bindings aren't generated beforehand but everything is done 
at runtime.

-- 
Mike Wey


More information about the Digitalmars-d-learn mailing list