Subject: Re: CVS commit: basesrc
To: None <tech-misc@netbsd.org, tech-userlevel@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-misc
Date: 08/12/2002 16:28:43
> 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	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B