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,b076e6315fd62dc5 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.220.230 with SMTP id pz6mr12811972pbc.3.1338383587380; Wed, 30 May 2012 06:13:07 -0700 (PDT) Path: pr3ni66025pbb.0!nntp.google.com!news1.google.com!goblin3!goblin.stu.neva.ru!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: fyi, very interesting Ada paper OOP vs. Readability Date: Wed, 30 May 2012 15:12:05 +0200 Organization: cbb software GmbH Message-ID: <7xfldlqwf9dd.1aqh5f5cghc00.dlg@40tude.net> References: <1ghvpneswil9f$.eafw9sso7xgo.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: FbOMkhMtVLVmu7IwBnt1tw.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-05-30T15:12:05+02:00 List-Id: On Wed, 30 May 2012 14:45:59 +0200, stefan-lucks@see-the.signature wrote: > On Wed, 30 May 2012, Dmitry A. Kazakov wrote: > >> What about fixing the language instead of thinking about ugly kludges? > > Something like > > for String use Ada.Strings.Unbounded.Unbounded_String; > > and then every "constant string" in the source code is read as > Ada.Strings.Unbounded.To_Unbounded_String("constant string")? Rather: type Unbounded_String is new String'Interface with private; String literals are primitive operations of String's interface. E.g. function "abc" return String; They are inherited by Unbounded_String and must be overridden per compositions with To_Unbounded_String: overriding function "abc" return Unbounded_String is To_Unbounded_String ("abc"); Sorry, for not inventing a syntax for such sort of delegation. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de