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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,92a027c293f03acb X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!news.glorb.com!news2.arglkargh.de!news.n-ix.net!news.belwue.de!news.uni-stuttgart.de!news.nask.pl!news.nask.org.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail From: Wiktor Moskwa Newsgroups: comp.lang.ada Subject: Re: Workqueues in Ada Date: Sat, 28 Jul 2007 22:12:10 +0000 (UTC) Organization: tp.internet - http://www.tpi.pl/ Message-ID: References: NNTP-Posting-Host: aaeu42.neoplus.adsl.tpnet.pl X-Trace: atlantis.news.tpi.pl 1185660730 28006 83.4.124.42 (28 Jul 2007 22:12:10 GMT) X-Complaints-To: usenet@tpi.pl NNTP-Posting-Date: Sat, 28 Jul 2007 22:12:10 +0000 (UTC) User-Agent: slrn/0.9.8.1 (Linux) Xref: g2news2.google.com comp.lang.ada:1253 Date: 2007-07-28T22:12:10+00:00 List-Id: On 28.07.2007, Robert A Duff wrote: >> On 28.07.2007, Robert A Duff wrote: >>> Wiktor Moskwa writes: >>> >>> I would be very interested in seeing the code that causes this. >> >> Here you are: > > Well, thanks, but I really meant I'd like to see which part of PragmARC > is causing trouble. I assume the following is a cut-down example, > right? I just wanted to give "a simple reproductive test-case" :) In PragmARC most packages get a limited private generic type (called Element) as an argument. Above error arises in components' Get functions that return Element. > Right, this is illegal in Ada 2005. The fix is probably to remove > "limited" from Element, above, but I'd have to see the actual code to be > sure. The compiler suggests, "consider switching to return of access > type", but I think that's bogus. It doesn't look easy to port such code to Ada 2005 without removing "limited". It would probably mean switching whole library to use a lot of access types instead of "implicit passing by reference" which is now. > P.S. I was one of the people who worked on implementing the new Ada 2005 > limited-types stuff in GNAT. Nice to hear :) Limited types idea seems quite difficult to me. I don't understand why limited "in" arguments can be passed by reference to a procedure but "out" can't (probably because after passing object to the caller that object can finish its life but it's still fuzzy). I had lots of problems with tagged types too. I wonder if using access parameters everywhere is a remedy for all troubles in Ada 2005. -- Wiktor Moskwa