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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ec21c3c7cdc7ff3e X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news2.google.com!newsfeed.gamma.ru!Gamma.RU!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.cw.net!cw.net!news-FFM2.ecrc.de!news-mue1.dfn.de!news-stu1.dfn.de!news.belwue.de!newsfeed.arcor.de!news.arcor.de!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: private types Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.14.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <1142279908.327131.230200@j52g2000cwj.googlegroups.com> Date: Sat, 18 Mar 2006 10:20:38 +0100 Message-ID: <140itbbkmjj04.l8k1gxu1jrc7.dlg@40tude.net> NNTP-Posting-Date: 18 Mar 2006 10:20:35 MET NNTP-Posting-Host: 4fab287e.newsread2.arcor-online.net X-Trace: DXC=59JXKgVFiSgA>\Y32QN0_hQ5U85hF6f;djW\KbG]kaMhQ>n?D9BSA]l^0\f^MK@8?i[6LHn;2LCVn[ On Fri, 17 Mar 2006 23:36:05 GMT, Justin Gombos wrote: > BTW- I sometimes have a use for creating an abnormal object, and find > Ada lacking in not providing such a mechanism. I'm sometimes > forced to either include abnormal values in the set of values > declared for a type, or to have a seperate flag. Both of these > are messy. Why not have a 'invalid function added to Ada to > enable simple and explicit initialization of abnormal objects? As Randy have pointed out, there is a great difference between faults and bugs. If we stay in the realm of correct programs, then the mechanism you are asking for is subtyping. One can exclude some values by putting a subtype constraint on the base type. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de