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!gandalf.srv.welterde.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Bug in Ada - Latin 1 is not a subset of UTF-8 Date: Fri, 21 Oct 2016 20:53:16 -0500 Organization: JSA Research & Innovation Message-ID: References: <86f0d2fe-d498-4bc4-bb9d-e34629c89bb4@googlegroups.com> NNTP-Posting-Host: rrsoftware.com X-Trace: franka.jacob-sparre.dk 1477101162 22335 24.196.82.226 (22 Oct 2016 01:52:42 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Sat, 22 Oct 2016 01:52:42 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:32158 Date: 2016-10-21T20:53:16-05:00 List-Id: "Dmitry A. Kazakov" wrote in message news:nu9s5v$18f0$1@gioia.aioe.org... > On 20/10/2016 02:31, Randy Brukardt wrote: ... >> It's not 100% as good as a constraint (as modifications of individual >> components won't be checked), but it almost always will do the job. > > Not nice. Is there a reason why, apart from premature optimization? Sure, checking after every component change would require passing some sort of checker subprogram with every reference parameter (since the actual could be part of some object that needs predicate checking). That sort of overhead would be completely unacceptable, especially as it would rarely be used. As such, we stuck with the model that the checks are made in the same places that whole object constraint checks are made (such as discriminant checks). For private types, there is no difference, but some failures might be detected late for types with visible components (like String). Randy.