Path: csiph.com!feeder.erje.net!2.eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Toy code for currency handling Date: Sun, 21 Jan 2018 12:24:48 -0800 Organization: None to speak of Lines: 28 Message-ID: References: <_u%VB.198174$pG.159657@fx18.am4> <87k1xymuhl.fsf@bsb.me.uk> <92115d86-d5df-4cf5-afe6-37379ec575d1@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="6a8f8d210cfc981a59477920c2767a2c"; logging-data="23722"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ENMMyLwNn5Lwm39SEZG4a" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:ueYCNUBUcecKeoRFMgLyh7tdgPs= sha1:nHvPxzlF0UodC+pIGe36vDhuDkU= Xref: csiph.com comp.lang.c:125570 supercat@casperkitty.com writes: > On Sunday, January 21, 2018 at 8:54:04 AM UTC-8, David Thompson wrote: >> Actually Unix 'a.out' format had 8 character (dualcase) names, but all >> C symbols were prefixed by underscore leaving only 7 for the user. In >> assembler you could use all 8. > > Some implementations of C include an extension which allow the linker name > to be specified independently of the C-language name. It's too bad there > was never any standard for that, since it would have eliminated the need > to impose linker restrictions upon the C-source-code names of symbols. > If one module has a symbol "computeThis" and another has a module > "computeThat" and the linker limits names to a max of six uppercase > alphanumeric characters, the modules could be made compatible by adding > e.g. 'void "COMTHT" computeThat();' to the header file of the module that > contains it. Any module which tries to call "computeThat()" would need > to be recompiled, but no other source-code changes would be required. You'd rather force programmers to come up with 6-character names than force linkers to handle longer names? You're advocating an inferior solution to a problem that was solved years ago. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"