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: 103376,9fb8e2af320d5b3e X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!news.tiscali.de!newsfeed.hanau.net!newsfeed2.scan-plus.net!newsfeed.ision.net!newsfeed2.easynews.net!ision!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Bus error Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: Date: Fri, 29 Jun 2007 12:17:42 +0200 Message-ID: <1w6zu5c84zxgr.1s9psi4ohqz0m$.dlg@40tude.net> NNTP-Posting-Date: 29 Jun 2007 12:14:39 CEST NNTP-Posting-Host: c69fc65f.newsspool3.arcor-online.net X-Trace: DXC=P2:2f\2_Xmd<6cDJZfMd_cMcF=Q^Z^V3h4Fo<]lROoRaFl8W>\BH3Yb18WbRhN6>1bDNcfSJ;bb[eFCTGGVUmh?dLK[5LiR>kgb3^HKgF]a>Pg X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:16337 Date: 2007-06-29T12:14:39+02:00 List-Id: On Fri, 29 Jun 2007 11:23:08 +0200, Grein, Christoph (Fa. ESG) wrote: > Was this feature, which is now lost, often used and very important? No so oft. One example I know is immutable lists of strings [actually any unconstrained objects]. We don't have aggregates or tuples of, so let's emulate them using a limited types: type List (<>) is limited private; function "/" (L, R : String) return List; function "/" (L : List, R : String) return List; procedure Foo (X : List); We could call Foo as Foo ("A" / "B" / "C" / "D"); Let we wanted to prevent the second "/" from copying lists. In order to do so, we would implement List as a controlled record containing a pointer to a reference-counted implementation of the list. So "/" would actually modify target of left argument in hope that it would vanish anyway. It will, if there were impossible to create a variable of List. X : List := "A" / "B"; Y : List := X / "C"; -- Surprise! > Then > we should consider making it again available in the next Ada version. Have you an idea of how it could be done? It looks difficult to me. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de