G'day all
Just to add my $0.02 to the namespace debate...
I like the idea of library namespacing using the syntax
"include <library> as <namespace>". I won't bore you by
repeating all the good reasons already discussed. I'd
also like the ability to define my own namespace, using
syntax like "namespace <namespace>" or similar. What I'd
*really* like to be able to do is something like the
following:
include kdewrap.eu as kde
include gnomewrap.eu as gnome
include motifwrap.eu as motif
include xwinwrap.eu as xwindows
namespace lib
sequence whatlib
<some code here>
if equal(whatlib, "KDE")
lib = kde
elsif equal(whatlib, "GNOME")
lib = gnome
elsif equal(whatlib, "MOTIF")
lib = motif
elsif equal(whatlib, "XWINDOWS")
lib = xwindows
else
telluser("Yo! Dummy! You didn't choose a library!")
abort(0)
end if
myvar1 = lib.function1(parms1)
myvar2 = lib.function2(parms2, parms3, parms4)
myvar3 = lib.function27(parms15, parms2)
if condition
myvar4 = kde.function98(parms11, parms35)
else
myvar4 = lib.function98(parms11, parms47)
end if
<etc>
Hopefully the above describes my thinking ;)
Regards
Tony
|
Not Categorized, Please Help
|
|