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 autolearn=ham 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!news4.google.com!feeder.news-service.com!newsfeed.straub-nv.de!feeder.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: A new notion: stronglly-typed-by-user language Date: Sat, 17 Apr 2010 13:40:23 +0200 Organization: Adalog Message-ID: References: <37p79j7nw4ep.9f8pem1g4f7l$.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Injection-Date: Sat, 17 Apr 2010 11:40:26 +0000 (UTC) Injection-Info: feeder.eternal-september.org; posting-host="JwV/6BMFtPItbxmxNDTTMw"; logging-data="17380"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX186ph2I8AhoGuNsKWQy5eju" User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) In-Reply-To: <37p79j7nw4ep.9f8pem1g4f7l$.dlg@40tude.net> Cancel-Lock: sha1:oMuoicUrmxygANu+Fh736uKJC4k= Xref: g2news1.google.com comp.lang.ada:10038 Date: 2010-04-17T13:40:23+02:00 List-Id: Dmitry A. Kazakov a �crit : > On Sat, 17 Apr 2010 07:25:25 +0200, J-P. Rosen wrote: > >> Note that T'Base is the same type as T, so there is no issue here. > > But it is not all same. The behavior of T'Base may differ, so it might be > unsafe to use one as an equivalent of another in certain contexts > (substitutability violation). > T is a subtype (the first named subtype) of T'Base. This is not different from any issue of type vs. subtype. My point is that two objects are of the same type if they represent the same abstraction. This is true of T and T'Base. Almost any language behaves as if there were only one integer type (represented on various number of bits depending on the constraints). This is somehow the mathematical view. But since we are modelling real world object, it is better to adopt a physicist point of view: objects have dimensions, and it makes no sense to add apples and oranges. That's what I would call strong typing. -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr