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!feeder.eternal-september.org!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: What do you think about this? References: <9894cde7-2cf8-4060-be65-857812ad7b09@googlegroups.com> <17436268-aceb-461f-bdcf-eee8436cd0e6@googlegroups.com> <86y4jaqzdx.fsf@stephe-leake.org> <86oak5qulb.fsf@stephe-leake.org> <86k2usq66p.fsf@stephe-leake.org> Date: Fri, 03 Jul 2015 07:31:03 -0500 Message-ID: <864mllqv7c.fsf@stephe-leake.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (windows-nt) Cancel-Lock: sha1:z82JXgo+sSOCwOOf15b7gKNlfAk= MIME-Version: 1.0 Content-Type: text/plain X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: 7af6155968088e97f808416219 X-Received-Bytes: 2554 X-Received-Body-CRC: 4035381808 Xref: news.eternal-september.org comp.lang.ada:26580 Date: 2015-07-03T07:31:03-05:00 List-Id: "Randy Brukardt" writes: > "Jeffrey R. Carter" wrote in message > news:mmhd5h$qef$1@dont-email.me... >> On 06/25/2015 06:16 AM, Stephen Leake wrote: >>> "Jeffrey R. Carter" writes: >>> >>>> This is a terrible idea. As compiler writer, ARG member, and ARM editor >>>> Brukardt >>>> said recently in another thread, anonymous access types are evil. >>> >>> This is one place they are very useful. >> >> Still evil and to be avoided, even here. >> >>>> I would even >>>> argue against a named access type for this, since unbounded strings are >>>> available. In this case, the OP has an instance of bounded strings >>>> available and >>>> would probably want to use that. >>> >>> That makes them non-constant, which is certainly _not_ the intent! >> >> Declaring the array constant deals with that. > > Exactly. Why make things more complex than necessary? There's a place for > the access-to-constant solution (although I'd use a named type), but it > isn't here since the OP is using an bounded string type for all of his > strings. He should not be using a bounded string type; that's the point. Using a bounded string always involves a hidden length limit; if it's too small, you'll hit it sometime, if it's too big, you're wasting storage. -- -- Stephe