> #2: Then, you could shorten it quite a bit:
> namespace fl = fltk3;
> namespace Fl = fltk3::Fl;
> 
> Now the difference in length for global functions would 
> dissapear; it would be much the same as without this inner 
> namespace, only global functions (and perhaps also constants) 
> would seem, syntactically, much as if they belonged to a 
> specific "class" of their own.
> 
> #3: Then there is the shortest option, for when you don't 
> need to enclose things within the outer namespace:
> using namespace fltk3;
> 
> Now the Fl:: (which is quite bearable to type) will remain in 
> front of global functions (and perhaps also constants), 
> avoiding naming collisions and having the nice side-effect of 
> making them instantly recognizable everywhere.

This is an interesting idea - though how would it play with the fltk2
port?

E.g. the fltk3 code fltk3::Fl::run() would become Fl::run(), which is
"the same" as you would normally write in fltk2 - so is there now an
ambiguity between fltk3 and fltk2, or is this really OK?



SELEX Galileo Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

_______________________________________________
fltk-dev mailing list
fltk-dev@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to