Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!ux1.cso.uiuc.edu!dino!hascall From: hascall@cs.iastate.edu (John Hascall) Newsgroups: comp.lang.c Subject: Re: Language principles Message-ID: <645@dino.cs.iastate.edu> Date: 17 Feb 90 01:32:29 GMT References: <1990Feb9.181942.24649@utzoo.uucp> <4721@rtech.rtech.com> <1990Feb13.153513.2196@hcr.uucp> Sender: usenet@dino.cs.iastate.edu Organization: Iowa State Univ. Computation Center Lines: 18 In article <1990Feb13.153513.2196@hcr.uucp> john@troch.UUCP (John R. MacMillan) writes: }In article <4721@rtech.rtech.com> mikes@rtech.UUCP (Mike Schilling) writes: }|From article <1990Feb9.181942.24649@utzoo.uucp>, by henry@utzoo.uucp (Henry Spencer): [Zero, one, infinity rule] }|I also remember a suggestion that languages force symbolic names to be used }|for constants other than zero and one, to make it harder to embed magic }|numbers in code. I think this was Glenford Myers's idea. }average = (a + b) / TWO (people who do: #define 2 TWO, #define 3 THREE, ... should be beaten) ;-) #define N_TERMS 2 ==> #define N_TERMS 3 average = (a + b) / N_TERMS; ==> average = (a + b + c) / N_TERMS; John Hascall / hascall@atanasoff.cs.iastate.edu