is D ncurses-only language?

Gour gour at atmarama.net
Wed Nov 23 02:23:22 PST 2011


Hello!

Re-considering to use D for real-world project and must say that
we're very pleased by seeing all the progress which has happened in a
recent time...64bit DMD, gdc might be included in gcc, there are more
bindings available (we're interested abotu sqlite3), Phobos is receiving
new modules, community is alive @github...

There is still one area which needs, imho, more attention and that is
the GUI world or language bindings for different toolkits.

New web page says: "D is a lan­guage with C-like syntax and static
typ­ing. It pragmatically combines effi­ciency, control, and model­ing
power, with safety and programmer productivity." and I hope that the
word 'pragmatically' includes writing GUI apps as well (hopefully there
is still life for non-web apps) :-)

However, the world of GUI bindings is not thrilling...


a) DWT was supposed to become THE toolkit for D, maybe (I'm not sure) it
was still in the D1-era, but from the contact with the main (only) DWT
developer - "unfortunately DWT is not a project I'm currently focusing
on" andd, as he told me: "I think it's quite usable on windows and
linux, the mac port isn't finished yet".

Moreover, DWT is based on SWT-3.4, while SWT-stable is 3.7 with the
development on 3.8.

So, DWT(2) is not suitable for multi-platform GUI development in D. :-/

b) QtD repo @bitbucket has last commit by David in May. According to
him: "Qt 4.7 should work, although I haven't tested the latest minor
release", he and Max "working on it from time to time" and "It does the
job for me in its current form, and I don't have the time for working on
it any further".

Qt does not offer native look on supported platforms, although it looks
quite good.

c) gtkD looks it's in best shape...works with Phobos and Tango, with D
1.0 and D 2.0, 64 bits support, wraps GTK+ 2.22.x API.

Quite good, although a bit behind GTK+ schedule. The problem might be
there is only one developer (Mike) working on it.

There is endeavour to bring GTK+ looks good on Mac OS X, Windows port
needs, afaik, some more manpower, but GTK, in general, might look a bit
strange on non-Linux OS.

d) wxD...recently moved to github, the only developer (Anders) recently
announced he is stepping down from the project (let's hope he'll change
his mind), although there are some fixes committed and according to
Andrej "It compiles fine on DMD 2.056, but you need to compile wxWidgets via
DMD make first. It's described on wxd's website." which looks quite
good.

Considering that wxWidgets is the only player amongst {gtk,qt,wx}
providing native look on all supported platforms (2.9/3.0 brings new
Cocoa port), this looks as great option for true multi-platform
development of  GUI apps in D.

Now, wx lib is big and I was discussing it with wx folks about the
possibility to make it easier for language bindings developers.

Here is the comment from one of the main wx devs, Vadim Zeitlin who
wrote ("help for language bindings developers" thread on wxwidgets
list):

<quote>

> it seems that there is prominent opionion that providing language
G> bindings for wxWidgets is not an easy and simple task.  

 This is pretty obvious, yes. I don't know of any library of comparable
size for which writing bindings would be an easy and simple task. Do you?

G> Otoh, I wonder if there is some general plan to have something like
G> introspection in GTK+ which could help present and future authors of
G> language bindings to make it easier to provide & maintain them for
G> plethora of languages?  

 I am not aware of such a plan. IMHO it's not very realistic and I think
the best bet to make writing bindings easier in practice would be to have a
well-maintained and working wxC project. I also think that SWIG is the best
bet to make it work in practice but there could be other approaches. In any
case the most important thing would be to find someone motivated enough to
work on it.
</quote>

and Robin Dunn, main dev behind wxPython said:

<quote>
I've decided to switch to SIP for wxPython, but the main goal of the 
Phoenix project is to auto-generate as much of the wrapper code as 
possible, so if other language bindings would rather use SWIG, some 
other tool, or custom C code with Phoenix then it should be possible. 
It will just take writing the generator class for the target back-end. 
There is still currently some Python and SIP-specific stuff in the other 
parts of Phoenix, but it should be possible to either remove that or at 
least to make it possible for other generators to ignore it.

OTOH, I've also thought of using Phoenix to generate a wxC library as 
Vadim mentioned, so maybe that would be a good first step for other 
bindings.
</quote>

So, one possibility would be to have wxC bindings from where it would
be, hopefully, easier to provide D bindings.

I'm aware there is no ideal GUI multi-platform toolkit, some look
better, some are better documented, supported as well.

My main concern is quotes like:

"I do like a lot of things about D. It still seems a bit raw to me for
"serious" projects though but then I last looked at it more than a year ago
so perhaps things have changed since then. It would be interesting to hear
if you run into any problems using it."

"Whether you use GTK or Qt, I see no reason to avoid C++.  I can
understand reluctance to build in C (there is Vala of course).  Python
is a good choice.  If you do want to build a project that is open source
and actually could have some community behind it, D is probably not the
best language to pick."

so I wonder whether D is meant to be ncurses-only language, or it is
possible to find some crew to enhance one of the above mentioned
projects so that it can be said that writing multi-platform deskop app
using D+X gui toolkit is safe & viable option *today* ?

I may say that considering nativity of wxWidgets it's my choise, I'd be
glad to know for any toolkit to receive more love.

In the meantime, we'll try to find the answer which toolkit might be
optimal for our needs (today & tomorrow) by using some non-technical
methods. ;)


Sincerly,
Gour

-- 
While contemplating the objects of the senses, a person 
develops attachment for them, and from such attachment lust 
develops, and from lust anger arises.

http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20111123/2321b913/attachment.pgp>


More information about the Digitalmars-d mailing list