[oclug] Thoughts on "Extensions" (Or,
is Embrace and Extend really all that bad?)
Jon Earle
je_oclug at kronos.honk.org
Fri Jan 11 10:21:30 EST 2008
Was poking around a manpage this AM and came across:
GNU EXTENSIONS
Glibc adds two functions not described by POSIX, with prototypes
And this got me thinking. Why is it okay, acceptable and absolutely never
mentioned when GNU embraces a standard (POSIX) and extends it with new
functionality? Yet, when Microsoft does the same, they are castigated as
being in cahoots with the devil (of whatever religion in which you choose, or
not, to believe).
There is no difference whatsoever between the GNU community adding new
features to standards and corporations doing the same. We modify code and
extend capabilities because we want a new feature, an old feature is lacking,
we simply want to tinker... and a whole myriad of other strange,
not-so-strange and perfectly valid reasons. Corporations do the same for
much the same reason, although they also have a business reason for adding
new capabilities and working code into a form that is suitable for their
projects.
Strictly speaking, a program written to use GNU extensions is no longer
compliant to any given standard (other than what GNU has written down in an
info document). If you were to compile a program with strict POSIX checking,
for example, it would fail. Just as if you were to compile a Windows program
with Microsoft extensions in a strictly POSIX environment, it too would fail.
And I'm sure most of our programs would fail if compiled in a strict,
standard C environment.
I think there has been a lot of mud-slinging directed against Microsoft and
the more I consider it, the more I see that much of that mud should be
directed back at the GNU community for doing precisely that which they railed
against.
Very much the case of "don't throw stones if you live in a glass house".
More information about the OCLUG
mailing list