From: David Turner (dkturner_at_[hidden])
Date: 2004-03-04 01:49:43
Beman Dawes wrote:
> At 11:13 AM 3/3/2004, Matthias Schabel wrote:
> >why not :
> >int main(int argc, char* argv)
> > window w("Example window");
> > w.add(button("Hello, world!"));
> > w.wait_for(delete_signal());
> I really took an instant dislike to the original demo code. Matthias' "why
> not" version is much more to my taste.
> The "why not" version seems more like C++. The "demo" version seems like
> something left over from the C days.
I had a feeling some people might have this reaction. I don't mind either
syntax (although wait_for is certainly not going to be a member of the
window class). Since the majority of people seem to be either in the
"don't mind" or "why not" categories, I'll change the syntax to be more
like the "why not" example.
The only real problem with "why not" is that gui widgets have shallow copy
> My own interest in a Boost GUI library would be for pretty simple
> applications and for teaching C++. Maybe a few medium complexity apps if
> the GUI requirements weren't too hard to meet.
That's my initial goal. I want to keep it as light-weight as possible.
> Even the "why not" version seems overly complex compared to a console
> iostreams "Hello, world". Why not just:
> winout << title("Example window") << button("Hello, world!")
> << wait_for(delete_signal);
> I'm not necessarily pushing that exact approach, but just pointing out
> C++-like alternatives.
As I pointed out in another post, stream-like syntax can be implemented
outside of the framework of the gui library. I'd rather do it that way,
if at all.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk