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,42e401e32683b965 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news2.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nntp.club.cc.cmu.edu!feeder.erje.net!newsfeed.straub-nv.de!noris.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: A new notion: stronglly-typed-by-user language Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <4bc895c9$0$6975$9b4e6d93@newsspool4.arcor-online.net> <1jjpbc9gydv5v.4k4dlkyntw06$.dlg@40tude.net> <4bc8cde4$0$28934$ba4acef3@reader.news.orange.fr> Date: Fri, 16 Apr 2010 23:51:14 +0200 Message-ID: <1dacp2di5tfhm.ieswqfkc1d3f$.dlg@40tude.net> NNTP-Posting-Date: 16 Apr 2010 23:51:14 CEST NNTP-Posting-Host: 6572c329.newsspool4.arcor-online.net X-Trace: DXC=L3^A`n2eTH[YI9]OHn9o5^4IUK On Fri, 16 Apr 2010 22:53:04 +0200, Pascal Obry wrote: > Le 16/04/2010 19:24, Dmitry A. Kazakov a �crit : >> BTW, the Ada's OO kernel has this same design flaw. You can clone all >> types, but tagged: >> >> type Count is new Current; -- This is OK only if Current is not tagged! > > type Count is new Current with null record; That would not create an unrelated type, the class is same. function "+" (Left : Current; Right : Current'Class) return Current; X : Current; Y : Count; begin X := X + Y; -- No type error -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de