
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. For an apples to apples comparison, window w("Example window"); should be compared with window w = create_window("Example window"); Finally, w.wait_for( delete_signal() ); just introduces a redundant top-level tag class and a corresponding redundant window_base overload.