Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!hao!oddjob!gargoyle!ihnp4!homxb!mtuxo!mtune!codas!killer!usl!usl-pc!jpdres10 From: jpdres10@usl-pc.UUCP (Green Eric Lee) Newsgroups: comp.lang.c Subject: Re: MAJOR ANSI C FLAW (my opinion, of course) Message-ID: <135@usl-pc.UUCP> Date: Mon, 26-Oct-87 16:51:33 EST Article-I.D.: usl-pc.135 Posted: Mon Oct 26 16:51:33 1987 Date-Received: Fri, 30-Oct-87 00:29:59 EST References: <1298@wyszecki.munsell.UUCP> <8781@utzoo.UUCP> Organization: Univ. of Southwestern La., Lafayette Lines: 68 Distribution: Keywords: Summary: In message <8781@utzoo.UUCP>, henry@utzoo.UUCP (Henry Spencer) says: >> Give me a break! How hard is it to make an existing compiler/linker >> accept longer names? If it isn't just changing the line >> #define MAX_EXTERN_LEN 6 >> to >> #define MAX_EXTERN_LEN 32 >> then the company that wrote that software deserves to be screwed, not >> the rest of the C community. > >First you have to change that line in *all* your compilers and *all* your >utilities that manipulate object files, and then recompile them all. That's >the easy part. Then you have to make all the object-file-manipulating >programs understand both old and new format, because there will always be >old-format files lurking in some obscure corner of the world. Then you >have to get those two-format programs out to every last customer who might >ever see a new-format object module. Then you have to warn the independent >software suppliers and convince them to update *their* programs similarly. >*Then*, finally, you can start shipping the new compilers. Fifteen or >twenty years later, you can perhaps think about dropping support for the >old format (for which you will be vilified by a substantial number of >customers, by the way, even then). Wow. That sure is a lot of trouble. I'd hate to do all that work, just to support a silly "C" compiler. Hmm. Hey. Wait. Why do I have to use IBM's linker to support my "C" compiler? Why don't I just supply a linker with my "C" compiler that can bind my "C" sources with external sources? Gee, yeah, that's the ticket, now I don't have to re-write my old linker that dates back to the 1950's, which would upset all my customers who are using the Autocode system on their 1700 emulators! Or, since there's lots of unused character values, why don't I just provide a mapping function that maps my, say, 12-character external names, into 6-character external names? I once used a system that allows 6-character names. Period. Total. Uniqueness wasn't enough. A couple of years laters, some enterprising hackers in Florida had patched the thing to do exactly what I just mentioned above (mapping 12-character names into 6-character external names that contained non-alphabetic characters). Worked, too, since the linker really didn't care what was in the 6-character name field... In summary, I don't think that supporting ancient linkers is worth the trouble of restricting us to 6-character uniqueness. If someone has gone to the trouble of writing a "C" compiler, the least they can do is go through the trouble of writing a linker to go with that "C" compiler, which is capable of binding both "C" objects and other objects. Yeah, same thing you talked about, but it really isn't as expensive as you imply. Talking about the expense of this linker is a bit ridiculous, considering how easy a task a linker is, compared to the difficulty of writing a compiler. Of course then you get to the point where you buy an Ada compiler for your computer which has its own linker, and a "C" compiler with its own linker, and want to link objects from each together. I'll leave this one up to the marketplace (hint: publishing your object/linker format as a "standard" is a way of both assuring compatibility with future products, and getting free advertising for your product to boot). Note what I'm saying. There's no reason for IBM et. al. to be involved with a "C" compiler project from a 3rd-party vender (unless they really want to!). Hardware venders wouldn't have to do a darned thing if ANSI required longer-length external labels (like, say, 8-12 characters). Any compatibility problems would be with the compiler manufacturer, not with the hardware vender. -- Eric Green elg@usl.CSNET from BEYOND nowhere: {ihnp4,cbosgd}!killer!elg, P.O. Box 92191, Lafayette, LA 70509 {ut-sally,killer}!usl!elg "there's someone in my head, but it's not me..."