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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,66fae8c862b81b17 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Received: by 10.180.84.74 with SMTP id w10mr4812992wiy.4.1352305074138; Wed, 07 Nov 2012 08:17:54 -0800 (PST) Path: ha8ni159560wib.1!nntp.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.134.4.91.MISMATCH!news2.euro.net!news.mixmin.net!aioe.org!.POSTED!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: Copy vector in Ada Date: Wed, 07 Nov 2012 17:17:51 +0100 Organization: Ada @ Home Message-ID: References: <1aWdnbcg_8-BzAzNnZ2dnUVZ_j6dnZ2d@giganews.com> <6260a796-83c4-4ce5-88cb-8249846bc035@googlegroups.com> <10y91ckm54l57$.8u8bbq342u1b.dlg@40tude.net> <2164bc1a-a841-46ed-bfef-4ddcae4d64f7@googlegroups.com> <1ccf2169-418c-44b7-9d5a-b684a017fbe7@googlegroups.com> <1r3lpzblxy43h$.zytp8ur1bg27$.dlg@40tude.net> <1k3sjasg1wftm$.1vlq5hm7vukhk.dlg@40tude.net> <1sinhhpvja1gx.1ue7br8bz2slq$.dlg@40tude.net> <5098f58c$0$6558$9b4e6d93@newsspool4.arcor-online.net> <509a4dfb$0$6642$9b4e6d93@newsspool2.arcor-online.net> NNTP-Posting-Host: aWaWeUaBdaj2Zzc04J1v5A.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.02 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable Date: 2012-11-07T17:17:51+01:00 List-Id: Le Wed, 07 Nov 2012 14:09:47 +0100, Dmitry A. Kazakov = a =C3=A9crit: > On Wed, 07 Nov 2012 13:03:08 +0100, Georg Bauhaus wrote: > >> On 06.11.12 20:47, Yannick Duch=C3=AAne (Hibou57) wrote: >>> Now, talking about proper naming of things, how would you explain to= a >>> student, that sometime =E2=80=9Ctype=E2=80=9D must follow the substi= tution principle, = >>> and >>> sometime, it do exactly the opposite? >> >> The challenge is to explain why the substitution principle is >> a valid commandment: > > It is not. > > Positive is a legitime subtype of Integer even though violates the LSP= . That's precisely what was said: both must not be confused. > The valid proposition is that you should not substitute something > non-substitutable, but you cannot enforce that through types. Correctn= ess > cannot be ensured through type checks. Yes, but just like typing fails to ensure all of the correctness in the = = large (and in some very few cases, even fails to accept valid things). = That's still the best balance we get between handy and safe. -- = =E2=80=9CSyntactic sugar causes cancer of the semi-colons.=E2=80=9D [1] =E2=80=9CStructured Programming supports the law of the excluded muddle.= =E2=80=9D [1] [1]: Epigrams on Programming =E2=80=94 Alan J. =E2=80=94 P. Yale Univers= ity