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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!reality.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: I am not understanding user defined exceptions Date: Thu, 9 Feb 2017 15:06:56 -0600 Organization: JSA Research & Innovation Message-ID: References: <6cb6e781-c6df-4962-99e3-760e7c7fab88@googlegroups.com> NNTP-Posting-Host: rrsoftware.com X-Trace: franka.jacob-sparre.dk 1486674417 4356 24.196.82.226 (9 Feb 2017 21:06:57 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 9 Feb 2017 21:06:57 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:33301 Date: 2017-02-09T15:06:56-06:00 List-Id: "Robert A Duff" wrote in message news:wcck28zfa69.fsf@TheWorld.com... ... > To convince me otherwise, you'll have to explain why we don't say: > > X: static constant Integer := 100; > static subtype S is Integer range 1..100; We've had this discussion before: (1) We don't have it because Ichibiah left it out. I think that was a mistake. (2) For the constant, you can declare it to be static and I usually do: X: constant := 100; It's unfortunate that you can declare an object to be static or give it a type, but not both. This kind of inconsistency is a flaw in the design of Ada. ;-) (3) Ada really does need such a capability. Staticness determines many Legality Rules and it can be a critical property when exposed in a reusable library. Unintentionally eliminating it can be disasterous for clients. I'd definitely be in favor of adding the "static" keyword as you have it above. (It would have to be optional, sadly, but of course a restriction could "fix" that.) But arguably it is much less likely to be changed by accident (although it has happened to me repeatedly) -- almost every operation that you'd expect to be static can be static (the main exception being representation attributes like Size). That's definitely not the case with Static_Predicates. (4) GNAT effectively nullifying a carefully considered and heavily debated decision in the ARG because a couple of people didn't like it is about the most evil behavior that an implementer could take. It's the sort of thing that makes me wonder why AdaCore is so invested in the Standards process if it just going to ignore the result when convinient. >>...(you could tell me to just try Static_Predicate first!) > > Sure, you can do that if you like. To me, "Static_" is just noise > (or necessary for portability). This kind of inconsistency is > a flaw in the design of Ada. You're just plain wrong, considering that we discussed this extensively in the ARG and the "maintenance is important" position carried the day. The flaw is that you can't declare most things static to avoid future problems. Randy. P.S. Side note: as with "constant", "static" probably should have been the default. It really should be necessary to declare something non-static or variable. That would be possible in a totally brand-new language, but sadly not in Ada or even an improved Ada-like language.