|
From: Keith M. <kei...@us...> - 2007-06-16 02:06:31
|
On Friday 15 June 2007 20:19, Danny Smith wrote: Sigh. You are entitled to your opinion, of course, but here we must=20 agree to disagree. I've seen all these stale old arguments before, and=20 with respect, not one of them bears scrutiny. > > But why uglify the names? =A0 > > Because some people want ANSI standard. =A0 And we satisfy that by providing the core set of functions, each=20 behaving *exactly* as specified, as required by whichever version of=20 the ANSI Standard for which we wish to claim conformance. That alone=20 is a necessary and sufficient condition of conformance. If we choose=20 to provide additional functions, however we choose to name them, they=20 have no bearing whatsoever on ANSI conformance. > > Just because Microsnot do it, doesn't mean we > > have to follow suit. =A0Better IMO to keep the same names as > > are used in > > glibc; uglification serves only to unnecessarily increase the > > porting burden, > > It avoid polluting the namespace with non-standard symbols Huh? What namespace? The functions in question would present a C=20 interface, and formally, there is no such thing as a namespace in C, so=20 how can it possibly be polluted? If you mean an ANSI pseudo-namespace,=20 which of course is an arbitrary and fictitious entity, then all symbols=20 which are not defined as required by the ANSI standard "pollute" that=20 pseudo-namespace; this is equally true, however the extra symbols are=20 named. Whether uglified or not, the extent of the "pollution" is=20 identical, for each symbol name. > > in deference to an irrelevant Microsnot convention, (unless > > there is a naming conflict to resolve). > > Actually, MS is doing the right thing here. Actually, MS is doing nothing more than adopting a convention; there is=20 nothing wrong in that, but it is entirely arbitrary, and therefore does=20 not qualify as being exclusively "right". POSIX defines many functions=20 which are not required by ANSI, yet these do not have uglified names. =20 Is the POSIX Standards Committee "wrong" to *not* adopt the MS=20 uglification convention? I think not! Indeed, of the tsearch, tfind, tdelete, twalk, tdestroy functions under=20 discussion here, all but tdelete are defined by POSIX, with *exactly*=20 those simple names. None of these functions is provided by any MS API,=20 so, if you make them available, the MS purist will not be using them,=20 and therefore should not care how you name them. However, the porter=20 of a POSIX application will expect to call them by name, *exactly* as=20 specified by POSIX, and will not thank you for uglifying those names;=20 you will both increase his work load, and force him to uglify his own,=20 otherwise portable code, just to accommodate an irrelevant convention=20 you've "borrowed" from Microsnot. If you do insist on these uglified=20 names, then you'd better also define aliases representing them by their=20 POSIX standard names, in an appropriate header file; congratulations:=20 you just *doubled* the pseudo-namespace pollution you set out to avoid. Regards, Keith. |