On 12/10/10 12:12 AM, BLS wrote:
Vote++ A discussion Forum would be nice too.
I am just trying to figure out what to do with :

operator HWND() const;

Any suggestions on that?

The previous attempt for D support in SWIG (which became unmaintained at a rather early stage and didn't make its way into the SWIG core distribution) had a project at DSource [1], but although I really appreciate all the effort that went into it and the great service it has been providing for a really long time now, I am not sure if DSource is the way to go for this kind of effort.

For example, DSource seems to be surrounded by a cloud of bad karma lately – lots of dead or obsolete projects, very busy admin(s), server outages, etc.

Also, a possible DSource project wouldn't really have a common source code base, at least I wouldn't want to maintain a collection of SWIG interface files for specific libraries I probably don't even use myself.

Another thing is that since D support is an official part of SWIG now, there are also the official communication channels (SF.net tracker, the swig-user ML, etc.).

These questions make me wonder if it would be a better idea to use separate repositories for each library binding, probably at some DVCS site where projects are easily forkable (like GitHub, Bitbucket and the likes), and keep a central page/thread somewhere with links to the individual projects.

Discussing SWIG and D is an entirely different topic, for which there are many possible options: a newly created digitalmars.D.bindings NG, a forum hosted somewhere (DSource, …), Stackoverflow (tagged »swig« and »d« or maybe even »swig-d«), the Swig-user mailing list, and probably a few more I didn't think of right now.


Regarding your specific problem: Generally speaking, operator overloading is WIP (hopefully I find time to implement it for D2 during the weekend), but implicit conversions can't really be mapped to D anyway, so just use the %rename directive of SWIG to map the implicit conversion operator to a regular member function like »asHwnd()«.


[1] http://dsource.org/projects/swig4d

Reply via email to