Language principles

Henry Spencer henry at utzoo.uucp
Sat Feb 10 05:19:42 AEST 1990


In article <CHUCKP.90Feb8095934 at halley.ncr-fc.FtCollins.NCR.com> chuckp at ncr-fc.FtCollins.NCR.com (Chuck Phillips) writes:
>John>     ZERO-ONE-INFINITY:  The only reasonable numbers are zero, one, and
>John>        infinity.
>
>On most of the points I agree.  However, this restriction seems a bit
>bizarre...  Could you provide a bit more context to this? ...

The point of this rule, which goes back a long way, is that an arbitrary
limit will usually get in the way eventually.  If the system only allows
you ten file descriptors, somebody will come up with a program that wants
eleven and gets horribly contorted if it has to work within the limit.
If your language limits arrays to a maximum of three dimensions, somebody
will need four.  And so on.  The only good numbers are zero (don't do it
at all), one (do it but don't let the issue of "how many" come up), and
infinity (let the user decide how many he wants).
-- 
SVR4:  every feature you ever |     Henry Spencer at U of Toronto Zoology
wanted, and plenty you didn't.| uunet!attcan!utzoo!henry henry at zoo.toronto.edu



More information about the Comp.lang.c mailing list