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: a07f3367d7,3ef3e78eacf6f938 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,CP1252 Path: g2news2.google.com!postnews.google.com!o6g2000yqj.googlegroups.com!not-for-mail From: Martin Newsgroups: comp.lang.eiffel,comp.lang.ada Subject: Re: Alternatives to C: ObjectPascal, Eiffel, Ada or Modula-3? Date: Tue, 21 Jul 2009 08:17:37 -0700 (PDT) Organization: http://groups.google.com Message-ID: <24678457-67b9-4976-a4ae-70cf477949e7@o6g2000yqj.googlegroups.com> References: <4A64C6FE.3040003@yahoo.com.br> <1q7swl7pyo55h$.1c0nqh26yfp8y.dlg@40tude.net> NNTP-Posting-Host: 20.133.0.8 Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1248189457 7945 127.0.0.1 (21 Jul 2009 15:17:37 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 21 Jul 2009 15:17:37 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: o6g2000yqj.googlegroups.com; posting-host=20.133.0.8; posting-account=g4n69woAAACHKbpceNrvOhHWViIbdQ9G User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.12) Gecko/2009070611 Firefox/3.0.12,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.eiffel:374 comp.lang.ada:7247 Date: 2009-07-21T08:17:37-07:00 List-Id: On Jul 21, 3:30=A0pm, Cesar Rabak wrote: > Dmitry A. Kazakov escreveu: > > > > > On Mon, 20 Jul 2009 16:35:26 -0300, Cesar Rabak wrote: > > >> Hibou57 (Yannick Duch=EAne) 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, w= hy > >>>> 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. > >> 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 s= et > >> of operations on it. > > > It defines a new set of values, which automatically makes the operation= s > > different even if they are numerically equivalent or their low-level > > implementations are shared. > > It defines a syntactic difference and as shown until now all the > operations remain equal, even when the OO technique would suggest not: > for example the new 'type' proposed for the angle measurement could make > the wrapping automatically when operations made the results greater than > 2*pi. The user is free to define (override) the arithmetic operations to do that. As can happen with brief code snippets, one can erroneously infer that language 'X' can not do something because a very small example does not show that it can do it! Cheers -- Martin