
"Peter Dimov" <pdimov@mmltd.net> writes:
Matthias Schabel wrote:
As far as the demo program :
int main(int argc, char* argv[]) { window w = create_window(); w->title("Example window"); w->contain(create_button(w, "Hello, world!")); wait_for_signal(w->delete_signal); }
why not :
int main(int argc, char* argv[]) { window w("Example window"); // more consistent with button syntax below w.add(button("Hello, world!")); // no need to have w be a pointer? w.wait_for(delete_signal()); }
or something like that.
Many C++ people like shallow copy things to explicitly have a pointer-like syntax. I, personally, can happily tolerate either.
Me too.
For an apples to apples comparison,
window w("Example window");
should be compared with
window w = create_window("Example window");
http://news.gmane.org/find-root.php?message_id=%3cuel05uq5p.fsf%40boost%2dco... shows a way to make the first syntax a little easier to produce. -- Dave Abrahams Boost Consulting www.boost-consulting.com