Re: CVS commit: basesrc

der Mouse <[email protected]>
Newsgroups gmane.os.netbsd.devel.general
Message-ID <[email protected]>
> libc is for stuff of *general* use to a programmer, even if they're
> not dealing with system related goo.  "humanize_number" is very much
> not a libutil thing -- same for fparseln.  Both could be used in
> almost any sort of program.

However, there's another issue: libc *must* be linked into
approximately every program.

That makes namespace pollution in it a very important matter.  Every
time you add a function to libc, you are risking breaking anything that
used that name for its own purposes.

This is not hypothetical; I've been bitten by it myself with respect to
heapsort.  I've had to rename heapsort to heap_sort in several of my
own programs as part of porting them to NetBSD, because it preempts
heapsort.  (And the NetBSD interface differs significantly from the
interface I have normally used; renaming was easier than trying to
rewrite the calls to use a different interface, especially since the
NetBSD inteface is not only uglier to my eye but necessarily slower,
probably significantly so in many cases.)

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       [email protected]
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.