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,ASCII Path: g2news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!news.cs.univ-paris8.fr!gegeweb.org!aioe.org!not-for-mail From: Cesar Rabak Newsgroups: comp.lang.eiffel,comp.lang.ada Subject: Re: Alternatives to C: ObjectPascal, Eiffel, Ada or Modula-3? Date: Tue, 21 Jul 2009 12:02:08 -0300 Organization: Aioe.org NNTP Server Message-ID: References: NNTP-Posting-Host: CypMocAmQgU7ZoH9HGMqRg.user.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org X-Antivirus-Status: Clean X-Notice: Filtered by postfilter v. 0.7.9 X-Antivirus: avast! (VPS 090513-0, 13/05/2009), Outbound message Cancel-Lock: sha1:vhUBf2ZOo6lXd5xHn+O7Lh3qJqM= User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) Xref: g2news2.google.com comp.lang.eiffel:373 comp.lang.ada:7246 Date: 2009-07-21T12:02:08-03:00 List-Id: Jean-Pierre Rosen escreveu: > Cesar Rabak a �crit : >> Ludovic Brenta escreveu: [snipped] >> More or less. It has all the operations of the derived type, uses the >> same representation on the machine. The incompatibility is syntactic no >> in its essence. >> > Here is the crux of the misunderstanding: sure, at /machine/ level they > are the same, but in the /problem domain/ they are different. The big > difference between Ada an other languages is that types (even elementary > ones) reflect the problem domain, not machine types. Yes but the crux is another: the four 'new types' suggested for solution to a problem shown by B. Meyers in Ada language for the need of different function signatures *do not* reflect the problem domain: for the later all the numbers are just this _numbers�_. The Ada implementation in order to be able to have two different 'constructors' for the new type Point (this indeed a *new* type) created through its mechanisms subtypes, which only send the trash over the wall. All this discussion about avoiding programmer errors can be attained instead of creating four nicknames for Float to allow: procedure makePointXY(X : Float; Y : Float) is begin null; --Whatever. end; procedure makePoint_R_Theta(R : Float; Theta : Float) is begin null; --Whatever. end; Do you agree the programmer will find the mistake easily as well? -- Cesar Rabak [1] Specializations of the concept for say a screen where coordinates are integers and limited to screeen area, for example are not being discussed here, as are not the kernel of Meyer's critique.