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,5af5c381381ac5a7 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!x21g2000yqa.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: Ada requires too much typing! Date: Thu, 10 Jun 2010 00:21:02 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <03f84a0a-e070-43a9-9b68-920345f64f94@r27g2000yqb.googlegroups.com> <1c704c1e-1b2e-427f-ae0e-3b2a0f976c7c@y4g2000yqy.googlegroups.com> NNTP-Posting-Host: 128.141.44.180 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1276154463 1286 127.0.0.1 (10 Jun 2010 07:21:03 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 10 Jun 2010 07:21:03 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: x21g2000yqa.googlegroups.com; posting-host=128.141.44.180; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3,gzip(gfe) Xref: g2news2.google.com comp.lang.ada:12527 Date: 2010-06-10T00:21:02-07:00 List-Id: On 10 Cze, 08:13, "Randy Brukardt" wrote: > >The overly object-oriented style (OOO (tm)) promotes or even relies on > >overly dynamic memory management model. > >This naturally leads to Pointers Everywhere Driven Development (PEDD). > > Maybe in C++ This is what Martin asked for. It is possible to go pretty far without using pointers, but it's enough to introduce at least one factory design pattern and you're tied. (but there is more, see below) The Ada's ability to return unconstrained types from functions is really good (it allows to initialize class-wide object based on run- time decisions) and contributes to better handling of OO. This is a very important difference and I found it illuminating when comparing OO models in these two languages. > (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. A similar idiom is used in YAMI4, where message handlers are instances of types that derive from common interface: http://www.inspirel.com/yami4/book/6-2-1.html I am not aware of any way to support this functionality without access types. -- Maciej Sobczak * http://www.inspirel.com YAMI4 - Messaging Solution for Distributed Systems http://www.inspirel.com/yami4