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,640b65cbfbab7216 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder.news-service.com!newsfeed00.sul.t-online.de!t-online.de!storethat.news.telefonica.de!telefonica.de!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Ada.Strings.Bounded 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: <47F26C46.3010607@obry.net> <44d88b93-6a90-4c18-8785-2164934ba700@a9g2000prl.googlegroups.com> <47F652F7.9050502@obry.net> <47f7028d$1_6@news.bluewin.ch> <47F749CB.30806@obry.net> <96x8my4o4m7e.fskzcb6i31ty$.dlg@40tude.net> <276e98e3-3b3b-4cbf-b85c-dcae79f11ec5@b5g2000pri.googlegroups.com> <013e1d52-c25f-49ea-83ef-6ac4860858bf@s13g2000prd.googlegroups.com> Date: Mon, 14 Apr 2008 11:07:47 +0200 Message-ID: <8g2rpvi2ahu0$.1ebsyq5yu1whf.dlg@40tude.net> NNTP-Posting-Date: 14 Apr 2008 11:07:47 CEST NNTP-Posting-Host: 9b20664a.newsspool3.arcor-online.net X-Trace: DXC=AhO5i4QOEEgeoCI^f\Y]EaMcF=Q^Z^V3h4Fo<]lROoRa^;5]aA^R6>b9miZagT93Ao[6LHn;2LCVn7enW;^6ZC`dIXm65S@:3>oSoSOVNPKe On Sun, 13 Apr 2008 16:20:24 -0700 (PDT), Eric Hughes wrote: > Why > shouldn't you derive from a universal type? Because it's not > implementable! One does not imply another. If you are aiming at Liskov substitutability principle, you should also remember how it is defined. It is in terms of *provable* propositions. Pragmatically, the program is correct even if there exist unreachable states where it could crash. However, LSP does not work anyway. > So I can now outline what the relationship ought to be: > -- The set of values of an implemented type is > a _subset_ of the terms of the universal type. Counterexample: NaN of Float. (The set of values of a derived type is neither subset or superset. It is a different set. There could be mappings defined between these two sets in order to achieve substitutability. Such mappings could be injective, or not) > -- The set of operators on an implemented type > _satisfy_ the axioms of the universal type. This cannot work because any implementation is necessarily a DFA. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de