> Just out of curiosity: I personally am very undecided about =20
> namespaces. Can you explain how namespaces make C++ nicer? (no, this =20
> is not a trap question. I am really curious).

"It's like using cd directory instead of typing full file name each time"

In bigger projects you have to write long names, like say
  mysql_debug_start_log();
with namespaces you can do
  mysql::debug::start_log();
and then you can shorten it:

  using namespace mysql::debug;
  start_log("foo");
  start_log("bar");
  start_log("baz");

and if start_log in some places is still ambiguous, then you can in that one 
place resort back to typing full namespace:
  mysql::debug::start_log();  somelib::developers::start_log();


There are few other nice tricks with it too.

Even noob^H erm, not very well planned languages - like PHP - do use namespaces 
recently.


_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to