Subject: Re: how to avoid API namespace collisions in an ever evolving system
To: NetBSD Userlevel Technical Discussion List <firstname.lastname@example.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
Date: 08/13/2002 23:38:15
> I think I'd much rather continue to program defensively and make sure
> the namespaces used in my applications are unique enough to never
> collide with any system supplied library. [...] ...since you did
> not in advance protect the global namespace of your program with a
> sure-to-be-unique naming convention.
What is this "sure-to-be-unique naming convention", and how do you know
it's unique, either now or more especially in the future?
I'd love to be able to foretell the future that reliably.
While something like prefixing all names in my programs with der_Mouse_
will _probably_ render them unique (or, really, collision-free with
respect to OS-provided headers), it's only "probably", and I'm not
willing to uglify my code that badly in any case. Not to mention that
doing so would introduce nonportability due to external name length
limits making everything collide.
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML email@example.com
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B