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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fee8802cc3d8334d X-Google-Attributes: gid103376,public From: bob@nospam.com Subject: Re: Ada and Java. different behaviour. casting long to int problem. Date: 1999/06/17 Message-ID: <7kbujm$1kb@drn.newsguy.com>#1/1 X-Deja-AN: 490867017 References: <7jt2c0$vrb@drn.newsguy.com> <7k57vb$1ipf@drn.newsguy.com> <3766650F.705125B7@pwfl.com> <7k64t7$igo$1@its.hooked.net> <7k689a$ci2@drn.newsguy.com> <3766C842.E1EAB60A@pwfl.com> <3766D1CC.D712895E@itools.symantec.com> <7k8nn5$qcb$1@its.hooked.net> <3767E8A2.EF1A0570@itools.symantec.com> <7k8tv3$3gm@drn.newsguy.com> <3769506F.157411C0@mitre.org> Newsgroups: comp.lang.ada Date: 1999-06-17T00:00:00+00:00 List-Id: In article , Hyman says... > > >All I'm saying is that exceptions are better than wraparound only in >the test/debug environment. Out in the field, especially when the >software must work the first time, exceptions are probably going to be >more harmful than wraparound, because the former causes a large part >of the code to abruptly abort, while the latter causes a local >error. In many cases, the local error just causes a glitch but the >system as a whole can continue working. This logic does not make sense at all. When an exception happen, you catch it, and then you can simply ignore it if that is really what you want to do depending on the exception, or you print some error message and also ignore it, or you can throw it again. The point is, raising an exception and handling it, are 2 different issues. So your point about the program abruptly aborting do not make sense. In Java, exceptions are used so much, that it is hard to find 10 lines of java code without a try/catch in them somehwhere. And when you talk about a 'local error', I think you have you dark glasses on. Do you know that a number being one bit off, can end up causing the most major problems in the system down the stream? you'll end up with small bad data, traveling across the program, generating more bad data every where as it feeds more functions, which can end up with much more damage across all parts of the system. regards, Bob