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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3885b7fd66a1db28 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-12-23 03:13:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail From: Alfred Hilscher Newsgroups: comp.lang.ada Subject: Re: Why is Ada NOT a good choice for a beginner to programming? Date: Mon, 23 Dec 2002 12:11:06 +0100 Organization: T-Online Message-ID: <3E06EF4A.A72F3B82@t-online.de> References: <3E048CF5.EC92DE29@t-online.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.t-online.com 1040641970 04 6366 mBalEejSSEatCt 021223 11:12:50 X-Complaints-To: abuse@t-online.com X-Sender: 320001779794-0001@t-dialin.net X-Mailer: Mozilla 4.75 [de] (WinNT; U) X-Accept-Language: de Xref: archiver1.google.com comp.lang.ada:32227 Date: 2002-12-23T12:11:06+01:00 List-Id: "James S. Rogers" schrieb: > > > Constraint_Error is a run time exception. The compiler cannot detect all > possible errors. Some are detectable only at run time. Sure, but there are some sort of statements where the compiler KNOWS that there an exception will be raised. So - why not give a warning at compile time? The Aonix compiler do so!!! > The GNAT > compiler identifies the location in the code where a Constraint_Error > was raised. It is up to the programmer to the trace through the code > to determine the initial cause of the error. Often the initial cause is > improper logic some distance from the location where the exception > is raised. In the case of the thread mentioned above, the error was > caused primarily by unfounded assumptions made by the OP. Nevertheeless the compiler could give a hint during compilation, couldn`t it? > According to the RM the compiler and run time system behaved > properly. Yes, yes. The behaviour is correct, but it could be more supportive. Don`t you think it's good to be informed early? Ok, then lets switch back to C (_all_ errors will be detected during runtime).