🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #359

Re: Significant name length list

#359
From: Henry Spencer
Date: Sun, 23 Jul 1989 02:15
19 lines
1523 bytes
In article <116@psitech.UUCP> david@psitech.UUCP (david Fridley) writes:
>Requiring there to be a maximum name length is the sign of an inexperienced
>programmer.  It is a simple process to tag each symbol with its length and
>realloc() the block untill it is big enough for any symbol...

Claiming that "it's simple to do it right, so everyone should do it that
way" is the sign of someone who never maintains other peoples' software. :-)

As I understand it, the reason why ANSI C *encourages* unlimited-length
names but *permits* a limit of 31 significant characters for internal names
(we won't get into the external-name mess again...) is to make it easy to
retrofit existing compilers that were not built for unlimited-length names.
Nobody with any sense is going to implement a fixed limit in a new compiler,
but s/8/31/g is a whole lot easier than changing fixed-length tables to use
malloc, especially if you've got a tight deadline and a lot of more serious
ANSI-compatibility problems to worry about.
-- 
1961-1969: 8 years of Apollo.  |     Henry Spencer at U of Toronto Zoology
1969-1989: 20 years of nothing.| uunet!attcan!utzoo!henry henry@zoo.toronto.edu
Technical Details
Message-ID: <1989Jul23.021533.27429@utzoo.uucp>
Path: arc1-ca.pugleaf.net!utzoo!henry
References: <2146@dlvax2.datlog.co.uk> <12570020@hpclscu.HP.COM> <116@psitech.UUCP>

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c
Path: arc1-ca.pugleaf.net!utzoo!henry
From: henry@utzoo.uucp (Henry Spencer)
Subject: Re: Significant name length list
Message-ID: <1989Jul23.021533.27429@utzoo.uucp>
Organization: U of Toronto Zoology
References: <2146@dlvax2.datlog.co.uk> <12570020@hpclscu.HP.COM> <116@psitech.UUCP>
Date: Sun, 23 Jul 89 02:15:33 GMT