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,a3736685ef876ab2,start X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!d55g2000hsg.googlegroups.com!not-for-mail From: braver Newsgroups: comp.lang.ada Subject: OO Style with Ada Containers Date: Wed, 14 Nov 2007 15:28:26 -0800 Organization: http://groups.google.com Message-ID: <1195082906.420079.195000@d55g2000hsg.googlegroups.com> NNTP-Posting-Host: 213.145.35.9 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1195082906 11247 127.0.0.1 (14 Nov 2007 23:28:26 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 14 Nov 2007 23:28:26 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Opera/9.24 (Macintosh; Intel Mac OS X; U; en),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: d55g2000hsg.googlegroups.com; posting-host=213.145.35.9; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 Xref: g2news1.google.com comp.lang.ada:18394 Date: 2007-11-14T15:28:26-08:00 List-Id: I've implemented a small system with Ada Containers and am wondering about how do folks manage to keep their mental faculties together with it. Instead of OO's uniquitous Object.method(params), we end up with something like: package Some_Things is new Ada.Containers.Things(...) package ST renames Some_Things; Something: ST.Type; while ST.Method(Someting,...) loop -- AT is Another_Things instantiation ...if AT.Method(Fun(Something), Another_Things.Method(...)) then ... end if; ... end loop; I've found that if I use several components in the same scope, I introduce renames -- sometimes I get warnings of names hidden due to clashes, often I enclose heavy usage of a certain container in a declare use Some_Things; begin ... end; -- but this is all very not-warm-and-fuzzy... How do you make the usage of Ada Containers less verbose? Cheers, Alexy