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-Google-Thread: a07f3367d7,735c710b5e547bad X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.180.82.226 with SMTP id l2mr972403wiy.1.1343273618121; Wed, 25 Jul 2012 20:33:38 -0700 (PDT) Received: by 10.68.223.40 with SMTP id qr8mr113794pbc.0.1343273617494; Wed, 25 Jul 2012 20:33:37 -0700 (PDT) Path: q11ni67975844wiw.1!nntp.google.com!volia.net!news2.volia.net!feed-A.news.volia.net!4no9072479pbo.1!news-out.google.com!b9ni60977278pbl.0!nntp.google.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!ctu-peer!news.nctu.edu.tw!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Ada 2005 puzzle Date: Sat, 21 Jul 2012 10:34:56 +0200 Organization: cbb software GmbH Message-ID: <1nnq1oprn6h4f.1s5myl3oupdds$.dlg@40tude.net> References: <1arp60wtxes8h$.1qs6bt732ztgp.dlg@40tude.net> <030cde76-7435-405d-9f12-ac7f730ecab8@googlegroups.com> <1f9q6vk5z2r3t$.1hayo9rmxfwu7$.dlg@40tude.net> <1agfifqlayl3y.1bp09z5i37ewk$.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: 9A8bJrx4NhDLcSmbrb6AdA.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2012-07-21T10:34:56+02:00 List-Id: On Fri, 20 Jul 2012 19:04:05 -0500, Randy Brukardt wrote: > "Dmitry A. Kazakov" wrote in message > news:1agfifqlayl3y.1bp09z5i37ewk$.dlg@40tude.net... >> On Thu, 19 Jul 2012 21:22:27 -0500, Randy Brukardt wrote: > ... >>> The ARG isn't going to do anything unless real users (like yourself) report >>> reasonable examples that don't appear to be possible with the current rules. >>> Generally, we're not interested in *solutions* from the public (we're happy >>> to figure out the best solution for the language as a whole), but we are >>> interested in *problems*. >> >> The problem is just same it was when ARG invented limited aggregates and >> function returns. > > Sorry, I meant *specific* examples of useful things that you cannot find a > legal way to write. The example I posted illustrates the problem as found in original code, which is too large and proprietary anyway. > No one is likely to be that interested in philosophical concerns. Huh, what were *specific* examples caused ARG to accept limited aggregates and functions? >>> So far as (most) of the ARG is aware, there is no problem with this feature, >>> and in the absence of reports of real problems I doubt that anything will >>> change. >> >> You could simply say that you agree/disagree with the principle. > > I actually see little wrong with the Ada model. Rightness here would mean conformance to the principle that a limited aggregate were *always* possible to write when the nearest non-abstract ancestor had visible constructing function, or something else? > And the "problem" > that you had was artifically introduced because some implementers thought > implementing that would be hard. I don't understand that, I am not a language lawyer. You are. Is my example legal and GNAT wrong? In case it is illegal, then how do I change the aggregate to make it legal. > So you need to work harder to convince me. And I'm not going to be able to > do a very good job of convincing anyone else. Adam, another language lawyer, wrote that he was aware of the cases when aggregates were impossible to write. That that point all alarm bells should start ringing, no? > As I said, we need realistic > examples of problems that cannot be solved with the current rules. You would have plenty if you tried to make Claw objects limited. Working around such aggregates is one of the worst Ada issues I have. On top of that consider the case when the function is to return a class-wide object constructed using such an aggregate. > (And that isn't just addressed to you; it's really addressed to every user > of Ada. Too many people work around problems without pointing out their > language difficulties to us; we're never going to be able to fix language > problems we don't know about!) People actually using Ada have deadlines to meet. The best we could do is to record the issue and start working it around. If anybody had time to report a problem, he would be asked for an AI. Should he spent even more time and forged some AI, that would be discarded on whatever grounds. Don't get me wrong, I don't say this is wrong. Wrong is to expect us, Ada programmers, doing ARG's job. We can only point out that something is missing/wrong/difficult. The rest is up to ARG. Especially when it is about such fundamental issues as construction of limited objects. >>>> Why not to fix that too? Objects with the no-copies semantics are >>>> everywhere. Larger/complex the object become, less likely anybody would >>>> copy it. Clearly, Ada as a language for *large* projects shall support >>>> this. >>> >>> It can't be fixed; you almost always need copying in some circumstances. >> >> No, you never need copying except for scalar objects and marshaling. > > All objects need marshalling, and that's one of the obvious problems. Nope. There is no way you would marshal GUI button, network socket, task, linked data structure etc. >>> And if you expect me to take your problems to the ARG, let me say that they >>> will have a lot more weight if they come from real Ada users and not just me >>> (or Adam, or Bob, all of whom are "tainted" as implementors). >> >> You mean ARG is unaware that constructing functions cannot be written in >> the cases like presented? Or that they would not believe you or Bob telling >> so? > > Definitely unaware -- I've never previously seen a case that couldn't be > written with a bit of effort. Well, well, you knew that it did not work, but hoped that laymen could never be able to discover that? (:-)) > Anyway, spend a few minutes and send an example like your original one to > Ada-Comment, and it will get discussed properly. Otherwise, don't gripe > about it, because it surely isn't going to change. This is what I was afraid of, because the problem is not fixing this particular example but to ensure that no other examples like this existed. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de