From: Beman Dawes (bdawes_at_[hidden])
Date: 2004-11-08 10:42:21
At 07:38 PM 11/7/2004, George van den Driessche wrote:
>Back on the subject of a GUI library: I understand the motivation -
>that's where wxWindows arose. And I realise that nowadays a GUI library
>could be done in a much more modern C++ style. But my question is: is
>C++ the right language? I don't want this to descend into a religious
>war - C++ is my favourite language, but it isn't the best language for
>every task. Would a higher-level, more dynamic language be more
>suitable for GUI work? In a perfect world, I'd do all my back-end stuff
>in C++ and all the front-end development in, say, Python. By doing all
>the GUI work in C++ instead of an interpreted language, you:
>a) spend a lot more time recompiling.
>b) can less easily tweak a running program to try out different ideas.
>c) have to spend a lot of effort to construct a domain-specific
>language (c.f Spirit; see (a)).
>d) probably end up with a bigger codebase.
>So what do you stand to gain, other than being able to write GUIs in
>your favourite language, as opposed to your second-favourite language?
>The only thing I can think of is that you don't have to worry about any
>bridge between languages.
What you say makes a lot of sense if just you is involved. Or perhaps a
small enough group that they can all agree on the second-favorite language.
But in larger organizations that approach results in a proliferation of
languages. I know of a company that has let programmers write code in any
language they like. The result is a nightmare. Over a dozen languages are
in common use. The toolchains on some projects are so convoluted that the
projects cannot be moved between the several operating systems in use at
the company. Programmers cannot freely move to another project because they
often don't know all the languages that are required. It is a serious mess.
Thus the use of C++ as a GUI language may be sub-optimal as far as the
small picture goes, but could be a really smart move in terms of the big
Because what we are talking about is a library, rather than something in
the core language, non-users of the library don't pay for something they
don't use. As long as a C++ GUI library is useful to a significant number
of people it doesn't matter if lots of others choose a dual language
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk