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: fac41,3ef3e78eacf6f938 X-Google-NewGroupId: yes X-Google-Thread: 103376,3ef3e78eacf6f938 X-Google-NewGroupId: yes X-Google-Thread: 1008e3,3ef3e78eacf6f938 X-Google-NewGroupId: yes X-Google-Thread: 108717,3ef3e78eacf6f938 X-Google-NewGroupId: yes X-Google-Attributes: gide91fe56a56,gida07f3367d7,gid8d81cdf253,gid5b1e799cdb,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!193.252.117.184.MISMATCH!feeder.news.orange.fr!not-for-mail Date: Tue, 23 Mar 2010 18:54:47 +0100 From: Pascal Obry Organization: Home - http://www.obry.net User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; fr-FR; rv:1.8.1.22) Gecko/20090605 Thunderbird/2.0.0.22 Mnenhy/0.7.5.0 MIME-Version: 1.0 Newsgroups: comp.lang.eiffel,comp.lang.ada,comp.lang.modula3,comp.programming Subject: Re: Alternatives to C: ObjectPascal, Eiffel, Ada or Modula-3? References: <4BA8BA91.4050905@cherrystonesoftware.com> <4BA8F677.3090206@adalog.fr> <4BA8FD54.8020200@cherrystonesoftware.com> In-Reply-To: <4BA8FD54.8020200@cherrystonesoftware.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Message-ID: <4ba9005a$0$15857$ba4acef3@reader.news.orange.fr> NNTP-Posting-Date: 23 Mar 2010 18:54:34 CET NNTP-Posting-Host: 86.205.47.142 X-Trace: 1269366874 reader.news.orange.fr 15857 86.205.47.142:9978 X-Complaints-To: abuse@orange.fr Xref: g2news2.google.com comp.lang.eiffel:573 comp.lang.ada:10676 comp.lang.modula3:142 comp.programming:16450 Date: 2010-03-23T18:54:34+01:00 List-Id: Jim, > I included Pascal because once you get up into languages that do bounds > checking, performance will degrade. Pascal is one of those languages > that does bounds checking. It comes down to this: > > a) Either the programmer writes code to not exceed array bounds, or > b) Use a language that does it for you. > > The choice of (a) will cost you a little bit of time developing. > The choice of (b) is going to cost you in performance when done. > > If we were to add another language to our benchmarks, Pascal would be > the logical choice. And we may do it at some point in the future. We're > certainly going to add many more algorithms to the testing as time permits. I dont' know for Pascal, Ada does bound checking too. Nevertheless, in some cases the checks can be removed automatically, for example: type Tab is array (1 .. 10) of Integer; T : Tab; for K in T'Range loop T (K) := end loop; Here "T (K)" won't trigger a runtime check as the compile can see at compile time that K is always in the proper range. But anyway this is not even an issue. For performance you can always remove the checks using the right compiler option. Then you have the best of both worlds. During development the checks are really helpful, in production you remove them. Pascal. -- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://www.obry.net - http://v2p.fr.eu.org --| "The best way to travel is by means of imagination" --| --| gpg --keyserver keys.gnupg.net --recv-key F949BD3B