From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,730a7c3edfcae91f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-03 03:45:28 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!feed.news.nacamar.de!newsmi-eu.news.garr.it!NewsITBone-GARR!newsserver.cilea.it!news.crs4.it!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: Macks - adding unit constants? Date: Mon, 03 Nov 2003 12:45:26 +0100 Organization: CRS4, Center for Adv. Studies, Research and Development in Sardinia Message-ID: <3FA63FD6.1010208@crs4.it> References: <3F8514EC.8050702@crs4.it> <3F904FD6.7040301@crs4.it> NNTP-Posting-Host: sparre.crs4.it Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: pietro.crs4.it 1067855412 23447 156.148.70.170 (3 Nov 2003 10:30:12 GMT) X-Complaints-To: news@nntpserver.crs4.it. NNTP-Posting-Date: 3 Nov 2003 10:30:12 GMT User-Agent: Any Browser, HTML 4.01, XHTML 1.0 X-Accept-Language: fo, da, no, sv, is, fr, de, it, In-Reply-To: Xref: archiver1.google.com comp.lang.ada:1960 Date: 2003-11-03T10:30:12+00:00 List-Id: Stephen Leake wrote: > Jacob Sparre Andersen writes: >>Stephen Leake wrote: >>>Exception for user interfaces, you should only use one length unit in >>>your code; >> >>When it comes to my current problem I agree, but I am not sure I do it >>in general. >> >> > it might as well be meter (m). >> >>It is very impractical to have to remember to write "0.000_86" and not >>"0.86", when you put constants in your code. > > That's a user interface. Yes. But code _is_ my user interface. (or at least a part of it) > How often do you actually have hardcoded constants in real code? Much too often. > I'd expect them to be in an input file somewhere. They should be. But 1) you still need default values and 2) it is in some cases (including the one I am working on right now) an unneeded complication to add configuration files to the system. Jacob -- "This page inadvertently left blank."