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-7-bit Path: g2news2.google.com!news3.google.com!feeder.news-service.com!de-l.enfer-du-nord.net!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 15:00:54 -0300 Organization: Aioe.org NNTP Server Message-ID: References: <4a65eff6$0$30235$9b4e6d93@newsspool1.arcor-online.net> NNTP-Posting-Host: CypMocAmQgU7ZoH9HGMqRg.user.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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:Y06n3rb9wdqLm2FJQ0IEkrhRNTg= User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) Xref: g2news2.google.com comp.lang.eiffel:383 comp.lang.ada:7256 Date: 2009-07-21T15:00:54-03:00 List-Id: Georg Bauhaus escreveu: > Cesar Rabak schrieb: >> 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? > > > How is the example you have given different from > > procedure informalHint_H001(A : ANY; B : ANY) is > begin > null; > end; > > procedure informalHint_H002(A : ANY; B : ANY) is > begin > null; > end; > > with the procedure names replaced to match some > formal terms from the problem domain, but the types > left as is? > And what should we conclude then? > I conclude that the intent to prove B. Meyer was wrong in his OOSC example about the issue of procedure signatures for overloading (which happened to be in Ada and Colin bit the bullet) did not arrive at its intent. > We need a solid general case here, I think, to get this > argument away from things that are accidental. What's the > power of a type when it comes to program construction? The new types were introduced as means to circumvent Meyer's objection, and in this case we arrive at the conclusion that they quickly become artificial artifacts and worsen the 'ergonomics' of the programming. > > > Floats are an issue here. Let my insignificant finger > point at a strange mental, but measurable, line that language > makers and programmers alike draw > - between types reflecting elementary school experience, > - and types that they themselves defin, carefully[*]. > Sorry if it seems so. The issue I was trying to rise is that subtyping (in this case Float) did not solve, instead make it worse, the problem that B. Meyer rises. That can happen with other types as well. > Int, float, and char are taken to be meaningful rocksolid > concepts! > To the effect that every other week you see a CERT > advisory putting our noses into a dangerous mud of int > overflows (and buffer overflows), risking entire systems' > operation. Yes, but this is subject to another thread. But before you get too much hope, remember an int overflow did blow an Arianne rocket... > Isn't this a hint > that *not* bothering with elementary types is an > EMBARRASING_MISTAKE of programming men and women!? Buffer overflows are not an 'elementary types' problem, it is another kind of problem. > Well, at least if programming errors of this careless > kind do not contribute to our staying in business. As I mentioned in this thread, the error about measurement systems that costed NASA a Mars mission was coded in type safe system's language, wasn't it? > > > [*] Dabbling in basics of mathematics, I noticed that the > more prominent an author is or was, the higher his awareness > of the fact that we *don't* know what numbers are, > or how we manipulate them (Landau, Halmos, Weyl, > Dirichlet/Dedekind---I just looked at some intriguing > material, not the entire stuff). [**] Yup! But then we slip to very philosophical discussion ;-)