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!mx02.eternal-september.org!.POSTED!not-for-mail From: Bob Duff Newsgroups: comp.lang.ada Subject: Re: Dynamic allocation in the predefined language environment Date: Mon, 06 Jul 2015 10:45:00 -0400 Organization: A noiseless patient Spider Message-ID: <87y4itbb0z.fsf@theworld.com> References: <559a623d$0$293$14726298@news.sunsite.dk> <873811cre5.fsf@theworld.com> <559a8d12$0$297$14726298@news.sunsite.dk> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="b4bd072ef30bb90f74c8989c41f52440"; logging-data="26411"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18bSLJ4RulCBon5Stfh+QQu" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:4bY/K6Lyp/316/c3b3MXYcSDJpA= sha1:dibVJ1r+jCGh78knJONOMk/R6jk= Xref: news.eternal-september.org comp.lang.ada:26641 Date: 2015-07-06T10:45:00-04:00 List-Id: Matthias-Christian Ott writes: > It could be implemented in C or assembly language and than it could > definitely crash. Yes, it could be implemented in any language. But it still has to be implemented correctly. If it crashes, then it's not a conforming implementation of Ada. (And of course, "conforming implementation of Ada" is synonymous with "implementation of Ada"!) If you think the RM says otherwise, then either you are misunderstanding the RM, or else the RM has an error. The latter is possible, but for sure the INTENT of the RM is that running out of memory raises Storage_Error, and does not "simply crash". I mean, consider a simple addition: X + Y The RM requires this to compute the sum of X and Y, or raise Constraint_Error on overflow (or (unlikely) raise Storage_Error -- anything can raise Storage_Error). The implementer doesn't get to say, "Well the RM doesn't specify HOW '+' is implemented, and I'm choosing to implement it wrong." >...The point is: If the standard specifies how to > implement a package, you have to assume anything when reasoning about > the correctness of code. I don't understand that sentence. Are you missing a "not" or something? Anyway, your original complaint (that the language doesn't let you choose the storage pool used for containers) is quite correct. I think it was considered, but I don't remember the details. - Bob