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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,5af5c381381ac5a7 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!u-picardie.fr!news.ecp.fr!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Ada requires too much typing! Date: Thu, 10 Jun 2010 17:23:28 -0500 Organization: Jacob Sparre Andersen Message-ID: References: <03f84a0a-e070-43a9-9b68-920345f64f94@r27g2000yqb.googlegroups.com> <1c704c1e-1b2e-427f-ae0e-3b2a0f976c7c@y4g2000yqy.googlegroups.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1276208610 30374 69.95.181.76 (10 Jun 2010 22:23:30 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 10 Jun 2010 22:23:30 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5843 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-RFC2646: Format=Flowed; Original Xref: g2news2.google.com comp.lang.ada:12590 Date: 2010-06-10T17:23:28-05:00 List-Id: "Maciej Sobczak" wrote in message news:fef531f2-0f35-4ba5-8e79-9ae59e2a6a25@x21g2000yqa.googlegroups.com... > On 10 Cze, 08:13, "Randy Brukardt" wrote: ... >> (Probably copying a crappy design from some other >> language.) There should be almost no visible access types > > Well, not so fast. Access types are necessary for referring to > existing objects. > Think about request handlers in AWS, for example - the idea is that > objects are *registered* somewhere for future use. How would you do > that without access types? At least obtaining the 'Access value is > necessary, even if the explicit use of access variables can be > avoided. I'm talking about in the interfaces. Ada always allows you to take 'Access of tagged parameters, so the implementation of a class can surely do that if needed. But it should never, ever, expose that cruft to the clients. This is exactly how Claw works: a mess of access type cruft under the covers, almost no access types in the interfaces. The only existing access types are used to return access to existing objects; that will remain in the Ada 2012 design but it will be safe (unlike in the Ada 95 Claw design) because the lifetime of the returned access will have to be shorter than the existing objects (absent Unchecked_Deallocation, the destroyer of all that is safe ;-), and you won't actually have to write any of the dereferencing (it will look syntactically like you are reading/modifying the object itself in place). Randy.