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 X-Google-Thread: 10a146,fee8802cc3d8334d X-Google-Attributes: gid10a146,public From: Fraser Wilson Subject: Re: Ada and Java. different behaviour. casting long to int problem. Date: 1999/06/16 Message-ID: <929556835.117.47@news.remarQ.com>#1/1 X-Deja-AN: 490345505 References: <7jt2c0$vrb@drn.newsguy.com> <7k7ls5$15tv@drn.newsguy.com> <3767D042.C8A8B131@cajunbro.com> X-Complaints-To: newsabuse@remarQ.com X-Trace: 929556835.117.47 KZBGBQC4S164892E1C qube-02.us-ca.remarq.com Organization: Vegetarian Ada Programmers NNTP-Posting-Date: Wed, 16 Jun 1999 18:13:55 GMT Newsgroups: comp.lang.ada,comp.lang.java.programmer Originator: fraser@titanic Date: 1999-06-16T00:00:00+00:00 List-Id: paene lacrimavi postquam "George W. Bayles" scripsit: >Ada is a different language for different purposes. You don't >expect a compiled Ada program to run on anything but the >specific processor/system it was compiled for. Well ... unless you use one of the Ada -> JVM compilers of course. >Perhaps because the compiler is allowed to omit the array bounds >checking when it can prove it is safe - which in real programs is >almost always the case. So, the performance penalty is minimized. I can see this in for loops, but without a range subtype feature, the possibilities for eliding this check in other situations seem minimal. Can you have arrays over an enumerated type in Java? This also reduces runtime checks. Fraser. (change i's to y's for my real email address)