Path: utzoo!utgpu!water!watmath!clyde!att!att-ih!ihnp4!ihlpf!nevin1 From: nevin1@ihlpf.ATT.COM (00704a-Liber) Newsgroups: comp.lang.c Subject: Re: A tale of two C's. Message-ID: <4567@ihlpf.ATT.COM> Date: 28 Apr 88 00:45:10 GMT References: <152@ghostwheel.UUCP> <7691@brl-smoke.ARPA> <154@ghostwheel.UUCP> <7750@brl-smoke.ARPA> <195@sdeggo.UUCP> Reply-To: nevin1@ihlpf.UUCP (00704a-Liber,N.J.) Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 31 In article <195@sdeggo.UUCP> dave@sdeggo.UUCP (David L. Smith) writes: >In short, I feel that being able to replace library routines is >necessary for two reasons: To achieve a difference in functionality >without recoding the rest of the library routines which depend on the >one you want to change and to fix bugs when you don't have a source >license. I disagree with both these reasons. First, by replacing a library routine with your own you might still have to recode the rest of the library routines which depend on the one you want to change. Although your programs should make the assumption that they can only be dependent on the *description* of a library and independent of its' implementation, the implementor of the library routine is not bound by these restrictions. Also, you get name-space violations (how does cc know which function to call? Should it always call the new one?? If you define a third one, which one should we call??) and will very likely have problems using shared libraries. Point 2: If you want to change library routines for your program only, use statements like #define strcpy(s1, s2) my_string_copy(s1, s2) which makes this very explicit, and you don't need a source license. -- _ __ NEVIN J. LIBER ..!ihnp4!ihlpf!nevin1 (312) 510-6194 ' ) ) "The secret compartment of my ring I fill / / _ , __o ____ with an Underdog super-energy pill." / (_