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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Nasser M. Abbasi" Newsgroups: comp.lang.ada Subject: Re: a new language, designed for safety ! Date: Thu, 05 Jun 2014 04:13:46 -0500 Organization: Aioe.org NNTP Server Message-ID: References: <3bf7907b-2265-4314-a693-74792df531d1@googlegroups.com> Reply-To: nma@12000.org NNTP-Posting-Host: +bGw3iKtw0btMD059xlTWg.user.speranza.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 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:20137 Date: 2014-06-05T04:13:46-05:00 List-Id: On 6/4/2014 2:43 PM, Robert A Duff wrote: > But I wouldn't call it "unsafe" if you get a run-time error. This depends if the run-time error could have been avoided in the first place had the compiler been able to detect the problem at compile time or not? With these dynamics languages (Julia, swift, Matlab, etc...), many errors will show up at run-time, since there is no static time compiler with a rich language semantics that allows the compiler to do more analysis and find more errors even before the program is run. Even though some dynamic languages will not let one at run time mix apples and oranges, and will give run-time error, I'd rather know at compile time that I am not mixing apples with oranges. That is much more safe. Many times, one writes a program in a dynamic language and they would only know there is a bug in the code if they happen to hit a condition that leads to a code path at run-time with a bug in it. There could be a bug sitting in some corner of the source code for years and not be detected because of this since it is hard to test for all code paths all the time. So one will fly with the code and keep fingers crossed. On the other hand, dynamic languages are more fun, since they allow one to hack code so much faster! And many also come with build-in GUI. Also they come with really cool modern names such as "Julia", "Swift", "Hack", "Python", etc.. Compare this to the name "Ada", named after a programmer who lived hundreds of years ago :) > To me, "unsafe" means "misuse can cause unpredictable behavior". > Array indexing is safe in Ada (you get a run-time error if > you go out of bounds), but unsafe in C (anything can happen > if you go out of bounds). > > Anyway, I guess your point is that Ada prevents dangling dispatch at > compile time, which is a good thing, whereas Swift, Objective C, > and Smalltalk do not. > > - Bob > --Nasser