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: a07f3367d7,3ef3e78eacf6f938 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,CP1252 Path: g2news2.google.com!postnews.google.com!w41g2000yqb.googlegroups.com!not-for-mail From: =?ISO-8859-1?Q?Hibou57_=28Yannick_Duch=EAne=29?= Newsgroups: comp.lang.eiffel,comp.lang.ada Subject: Re: Alternatives to C: ObjectPascal, Eiffel, Ada or Modula-3? Date: Mon, 20 Jul 2009 11:49:16 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: NNTP-Posting-Host: 77.198.58.231 Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1248115756 32467 127.0.0.1 (20 Jul 2009 18:49:16 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 20 Jul 2009 18:49:16 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: w41g2000yqb.googlegroups.com; posting-host=77.198.58.231; posting-account=vrfdLAoAAAAauX_3XwyXEwXCWN3A1l8D User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; fr),gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.eiffel:335 comp.lang.ada:7184 Date: 2009-07-20T11:49:16-07:00 List-Id: On 20 juil, 20:33, Cesar Rabak wrote: > Here you create two "subtypes" which are only nicknames for Float in > order to help the Ada compiler to discriminate the signature. BTW, why > the need of two subtypes for coordinates? Not =93 subtype =94 but =93 type =94, which is not the same. Ada has both, = and both are differents. A type does not only designate a range of allowed values, it also designate a source, which in turn, associate design property to it (this can be asserted relying on type matching rules). If you want to be sure what a function recieve only come from a defined set of functions, then you define a type, some functions returning value of this types, or procedure modifying this type. Two types may seem similar at a quick sight, but types are not only used to define ranges. Types allow to define the valid flow of some objects or values, it allows to make assertions about where it come from and where it can go (thus, what was done with on/with it). This as to deal with the overall design, the whole usage of a library, and not only with the set of value allowed for a given type. This is not a kind of nickname, this is a difference written in the stone