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,25aa3c7e1b59f7b5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-01-04 08:29:13 PST Path: archiver1.google.com!news2.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!news-out.cwix.com!newsfeed.cwix.com!sjc-peer.news.verio.net!news.verio.net!ord-read.news.verio.net.POSTED!not-for-mail Newsgroups: comp.lang.ada From: Brian Rogoff Subject: Re: A case where Ada defaults to unsafe? In-Reply-To: Message-ID: References: <3C34BF2C.6030500@mail.com> <3C34D252.4070307@mail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Date: Fri, 04 Jan 2002 16:19:46 GMT NNTP-Posting-Host: 192.220.65.223 X-Complaints-To: abuse@verio.net X-Trace: ord-read.news.verio.net 1010161186 192.220.65.223 (Fri, 04 Jan 2002 16:19:46 GMT) NNTP-Posting-Date: Fri, 04 Jan 2002 16:19:46 GMT Organization: Verio Xref: archiver1.google.com comp.lang.ada:18539 Date: 2002-01-04T16:19:46+00:00 List-Id: On Fri, 4 Jan 2002, Robert A Duff wrote: > If you're looking for cases where Ada makes the default less safe, I can > think of a few. Here's one: "X: T := ...;" is a variable, whereas > "X: constant T := ...;" is a constant. IMHO, it should be the other way > around ("X: var T := ...;" for a variable), since constants are safer > than variables. I know I'm digressing a bit, but I'd prefer that ":=" not be used for declaring the value of a constant, since I think of that as being different from assignment. Better to use "=" IMO. Of course I am now spoiled by functional (quasifunctional :) languages like ML where assignment is far less frequent than in Ada or C++. Assignment and equality hide a lot of complexity behind a simple facade; that seems to have been recognized by the Ada designers. -- Brian