On Fri, Jan 20, 2012 at 2:43 PM, Gour <gour@atmarama.net> wrote:
On Fri, 20 Jan 2012 22:09:48 +0100
Andrej Mitrovic <andrej.mitrovich@gmail.com> wrote:

> I began porting those php scripts to D since yesterday. They are well
> documented and modularized so I think it's worth having a go at it.
> Oddly enough I've cloned the wxPhp svn repo yesterday without even
> knowing they've just merged these new changes in at the same time.

Thank you for this work...I must admit I wasn't eve naware there is
wxPhp project since this thread today.

> You've mentioned those python swig generators. I don't know the state
> of those, but I really doubt that SWIG support for D is mature enough
> for such a huge project.

Still, it would be worth exploring that route, right?...and ask for more
D support?

> Additionally wxPython uses SWIG, and SWIG
> supports Python for many years now, but even so the wxPython author
> wants to move away from SWIG and use doxygen or some other alternative
> instead. See: http://wiki.wxpython.org/ProjectPhoenix/ProjectGoals I
> also took a look at wxPython's SWIG interface files and it's *a lot*
> of code and workarounds.

Yeah, that's true. Robert wants to use SIP and he told me there is lot
of hand-written code for SWIG.

However, let's not forget that wxPython is also,afaik, offering higher-level
(aka Pythonic) interface to wx, so I bet we would like to have same with
wxD, right?


I occasionally try to think about what sort of changes would be made to the wxWidgets interface to be more idiomatic to D.  Signals come to mind (along with delegates wherever possible).  Range-based access to the items in certain containers is something that would be useful (wxWidget's container item accessing is a particularly bad part of its API).  Probably use D's date/time functionality rather than wxWidget's (or both).  There are some stream classes in wxWidgets which could probably be replaced with a range based interface (which would just serve as an adapter between ranges and the streams).

It's a shame D doesn't have named parameters because wxWidget's usage would benefit greatly from them (wxWindow and subclasses of it often have 4 or more default parameters that I often need to specify to get to the one parameter I actually want to set).  wxSizer's Add method is confusing enough that they added a named parameter idiom version so you could actually read the method call and figure out what is going on.

Regards,
Brad Anderson
 
> So I'm trying to port those php scripts and see if it's usable for D.
> When I have some scripts done I'll put them on github somewhere.

Thank you very much!

> Of course I'm not stopping anyone else from doing the same..

At the moment, I do not have much time to do anything with (wx)D, even
not much with computers, but we hope it will change in a few weeks.



Sincerely,
Gour

--
As a strong wind sweeps away a boat on the water,
even one of the roaming senses on which the mind
focuses can carry away a man's intelligence.

http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810