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: a07f3367d7,3ef3e78eacf6f938 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,CP1252 Path: g2news2.google.com!news3.google.com!feeder.news-service.com!feeder.erje.net!news-2.dfn.de!news.dfn.de!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!news.netcologne.de!newsfeed-hp2.netcologne.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Mon, 20 Jul 2009 23:54:29 +0200 From: Georg Bauhaus Reply-To: rm.tsoh+bauhaus@maps.futureapps.de User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 Newsgroups: comp.lang.eiffel,comp.lang.ada Subject: Re: Alternatives to C: ObjectPascal, Eiffel, Ada or Modula-3? References: <4A64C6FE.3040003@yahoo.com.br> In-Reply-To: <4A64C6FE.3040003@yahoo.com.br> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Message-ID: <4a64e795$0$32675$9b4e6d93@newsspool2.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 20 Jul 2009 23:54:29 CEST NNTP-Posting-Host: 0609d1b6.newsspool2.arcor-online.net X-Trace: DXC=iYY[LRZPBgOA@P]\DA9EHlD;3YcB4Fo<]lROoRA^YC2XCjHcbIK[2BKCaJ40MKQDKiQ7hA X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.eiffel:342 comp.lang.ada:7193 Date: 2009-07-20T23:54:29+02:00 List-Id: Cesar Rabak wrote: > Hibou57 (Yannick Duch�ne) escreveu: >> 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 � subtype � but � type �, which is not the same. Ada has both, and >> both are differents. > > They are *considered* different in Ada technology, I respect that, but > from a OO point of view, they are not: a new type would define a new set > of operations on it. Could, I'd say. A derived type could (1) define a new set of operations, or it could (2) just create a different kind of fruit exhibiting the same behavior (operation-wise), or (2a) override an operation, or it could (3) defer (Eiffel) or abstract (Ada) some operations. Except, perhaps, that Eiffel's elementary types are frozen, that is, cannot be subclassed at all (last time I checked). If Ada had an explicit unit system in addition to it's type properties (the 'First and so on), then I could imagine a case for requiring (2) to become (2a). Define a new (an own) floting point type derived from some other floating point type and make explicit where you expect them to be different, for example in their units.