From owner-freebsd-chat Fri Jul 30 7:28:19 1999 Delivered-To: freebsd-chat@freebsd.org Received: from whizkidtech.net (r36.bfm.org [208.18.213.132]) by hub.freebsd.org (Postfix) with ESMTP id D7E801568E for ; Fri, 30 Jul 1999 07:28:13 -0700 (PDT) (envelope-from adam@whizkidtech.net) Received: (from adam@localhost) by whizkidtech.net (8.9.2/8.9.2) id JAA00237; Fri, 30 Jul 1999 09:27:22 -0500 (CDT) (envelope-from adam) Date: Fri, 30 Jul 1999 09:26:50 -0500 From: "G. Adam Stanislav" To: Dag-Erling Smorgrav Cc: chat@FreeBSD.ORG Subject: Re: Changing the value of Pi Message-ID: <19990730092650.A223@whizkidtech.net> References: <199907291156.NAA06494@labinfo.iet.unipi.it> <19990730093259.A93194@freebie.lemis.com> <199907300302.XAA15392@khavrinen.lcs.mit.edu> <19990730085617.B228@whizkidtech.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.3i In-Reply-To: ; from Dag-Erling Smorgrav on Fri, Jul 30, 1999 at 04:11:24PM +0200 Organization: Whiz Kid Technomagic X-URL: http://www.whizkidtech.net/ X-Operating-System: FreeBSD whizkidtech.net 3.1-RELEASE FreeBSD 3.1-RELEASE Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Fri, Jul 30, 1999 at 04:11:24PM +0200, Dag-Erling Smorgrav wrote: > > Is this a trick question? You should just change one occurence in an > > include file and run make. > > You miss the point. Garrett was advocating the use of literal > constants instead of centrally defined symbolic constants. I have just re-read the original message, and you are right. I have to side with you. Literal constants are dangerous. If you misspell one, the compiler will have no objections. You may be tearing your hair later on trying to figure out what's wrong with your program. If, on the other hand, you misspell a symbolic name, the compiler will generally complain (I'm saying generally, because you may misspell it into another symbolic name - a good reason not to use similar names), and you will catch the error right away. This, to me, is even more important than changing the value later on (although, that is important as well). Adam To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message