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: buffer2.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!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: container cursor type cannot be tagged References: <85ppfkxvwg.fsf@stephe-leake.org> <85d2bjxscf.fsf@stephe-leake.org> Date: Sat, 30 Aug 2014 10:16:26 -0500 Message-ID: <85tx4uhut1.fsf@stephe-leake.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (windows-nt) Cancel-Lock: sha1:EARB1BP8/i8tnDcratm12u6pt+Y= MIME-Version: 1.0 Content-Type: text/plain X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: 77e985401ead2e3fb833011037 X-Received-Bytes: 1930 X-Received-Body-CRC: 273203121 Xref: number.nntp.dca.giganews.com comp.lang.ada:188756 Date: 2014-08-30T10:16:26-05:00 List-Id: "Randy Brukardt" writes: > "Stephen Leake" wrote in message > news:85d2bjxscf.fsf@stephe-leake.org... >> "Randy Brukardt" writes: >>> That seems to make more sense, honestly. But how are you dealing with the >>> "can't have two tagged types" problem for the container itself? >> >> I don't see the problem; I declared my container with tagged container >> and cursor, and only had a problem when I tried to instantiate >> Ada.Iterator_Interfaces. > > How did you do that? Any operation that takes a container and a cursor is > illegal if both are tagged. I don't see how you could have a constructor for > a cursor in that case (it must at least take a container and return a > cursor), It returns Cursor'class. > Using Cursor'Class in this circumstance is a lie (there never will be any > derived types that work) Right. But I don't care about derived types; Container and Cursor are tagged _only_ to allow using Object.Method. > and of course forces checking to runtime (or not at all). Yes. Which is why the Controlling_Type aspect is a better solution. -- -- Stephe