Andrei Alexandrescu:

Brad Roberts:
> > I don't think that any gui library belongs in phobos because there's
> > essentially no agreement about what cross-platform library is standard.
> 
> Python has something and as far as I can tell people are fine with that.

The situation is quite complex, some notes:
- CPython indeed has a GUI toolkit in the standard distribution, it's not 
native, it's a whole different interpreter with its GUI toolkit (Tcl-Tk), with 
a thin Python wrapper around it (tkinter). Despite looking like a card castle 
this somehow works and some people (like me) use this GUI toolkit to write 
simple GUIs. Scientific programs sometimes enjoy such simple GUIs.
- For a lot of time the GUIs created with tkinter didn't look native at all 
(the GUI were almost ugly (recently Tk has improved a lot on this, now it looks 
much more native)). And Tk despite having some qualities (efficiency, 
compactness, flexibility and more), was also limited and "strange" in its usage 
(it's like working with soft rubber). So people that want to create serious 
GUIs for Python programs never use tkinter. They use GTK, Wx and lately Qt. So 
using Python as comparison point for D GUI toolkits in the std library is not 
the best thing to do, because in a sense the Python std library GUI toolkit is 
not used by serious people.
- I like the idea of having a wide D standard library. But GUI toolkits are 
large, and they change a lot with time, so I accept to have them as external 
libraries.
- Delphi has a good enough built-in GUI toolkit, and people use it a lot. I 
have used it plenty. This seems a better comparison point for D.
- I'd like a simple graphics module in Phobos, to show simple graphics. It's 
handy in many situations, and it's useful to establish *standard D-wide* 
method/function names to plot a point, a line, circle, box, ecc. The same names 
can later appear in non-Phobos GUI toolkits.
- I'd also like a std.image module to load and save images in png, gif, jpeg, 
ppm, bmp. This is a very common need, even more common than a GUI toolkit, and 
there are far less ways to load a PNG than to create the API of a GUI toolkit.

Bye,
bearophile

Reply via email to