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: g2news1.google.com!news1.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx02.iad01.newshosting.com!newshosting.com!198.186.194.249.MISMATCH!transit3.readnews.com!news-xxxfer.readnews.com!news-out.readnews.com!postnews3.readnews.com!not-for-mail 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> <4ba9005a$0$15857$ba4acef3@reader.news.orange.fr> From: Patrick Scheible Date: 23 Mar 2010 13:33:14 -0700 Message-ID: X-Newsreader: Gnus v5.7/Emacs 20.7 Organization: The Zip Connection (zipcon.net) NNTP-Posting-Host: 69aa89db.news.zipcon.net X-Trace: DXC=^O_=g7_^Lbc:c^JI=HH@8bU>Dm5d6:E6mCgZSOIE\Z]o6i3K@k4DWOa<2IBkV^g4flC^8ec2g_c6a X-Complaints-To: abuse@zipcon.net Xref: g2news1.google.com comp.lang.eiffel:526 comp.lang.ada:9711 comp.lang.modula3:146 comp.programming:14646 Date: 2010-03-23T13:33:14-07:00 List-Id: Pascal Obry writes: > 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. It's been said that this approach is like having lifeboats on an ocean liner while it is in sea trials, and then taking them out when it starts to carry passengers. -- Patrick