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-Received: by 10.42.63.68 with SMTP id b4mr202147ici.21.1391782450767; Fri, 07 Feb 2014 06:14:10 -0800 (PST) Path: border1.nntp.dca3.giganews.com!backlog3.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!c10no11642450igq.0!news-out.google.com!s3ni10109qas.0!nntp.google.com!peer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!peer03.am1!peering.am1!npeersf04.am4!fx08.fr7.POSTED!not-for-mail Message-ID: From: Mike H Reply-To: Mike Hopkins Newsgroups: comp.lang.ada Subject: Re: Need help for constrained type References: <52f3c83c$0$6559$9b4e6d93@newsspool4.arcor-online.net> MIME-Version: 1.0 User-Agent: Turnpike/6.07-M (<8bw$+vrU77Pqs5diva7NqJwDIe>) NNTP-Posting-Host: 83.104.138.185 X-Complaints-To: abuse@demon.net X-Trace: 1391782449 83.104.138.185 (Fri, 07 Feb 2014 14:14:09 UTC) NNTP-Posting-Date: Fri, 07 Feb 2014 14:14:09 UTC Date: Fri, 7 Feb 2014 14:11:42 +0000 X-Received-Body-CRC: 2773566735 X-Received-Bytes: 2146 Content-Type: text/plain;charset=us-ascii;format=flowed X-Original-Bytes: 2463 Xref: number.nntp.dca.giganews.com comp.lang.ada:184707 Date: 2014-02-07T14:11:42+00:00 List-Id: In message <52f3c83c$0$6559$9b4e6d93@newsspool4.arcor-online.net>, G.B. writes >One approximation can make use of generics. The immediate >mention of the Len with the object declaration will not be >present. But otherwise the approximation preserves the >"interface" of Memory_Block, except that the .Len component >is no longer constant, and not guaranteed to be in sync with >the length of .Usage_Info, if someone messes with it. Cannot sync be guaranteed by placing the relevant bits and pieces as private types within a package such that they may only be manipulated by functions and procedures provided by that package? Or have I misunderstood something? B.T.W for those who have come to Ada from other places it is not always easy to feel comfortable with the higher levels of abstraction that the language supplies. One consequence is that not only should one not be surprised when there seems to be little correlation between the number of lines of source code and amount of code generated, one should also not be surprised when any such correlation is negative. -- The thing I like best about the Internet is that no one knows that, in reality, I am just another old dog! Mike