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,3ccb707f4c91a5f2 X-Google-Attributes: gid103376,public From: kilgallen@eisner.decus.org (Larry Kilgallen) Subject: Portability of Arithmetic (was: Java vs Ada 95) Date: 1996/10/15 Message-ID: <1996Oct15.174526.1@eisner>#1/1 X-Deja-AN: 189650600 x-nntp-posting-host: eisner.decus.org references: <325D7F9B.2A8B@gte.net> x-nntp-posting-user: KILGALLEN x-trace: 845415968/11252 organization: LJK Software newsgroups: comp.lang.ada Date: 1996-10-15T00:00:00+00:00 List-Id: In article , bobduff@world.std.com (Robert A Duff) writes: > In article , > Brian Rogoff wrote: >>To which I would add "hierarchical package system", though I'm sure someone >>out there must feel that this is also bad! This would approximate my short >>list of Ada advantages over Java. Besides GC, which is arguable, no one has >>listed any *language* advantages of Java over Ada. > > How about portability of arithmetic? In Java, int is always exactly 32 > bits 2's complement. In Ada, Integer is whatever the machine supports. > And if I say "type T is range 1..100;" I might get 32-bit arithmetic, or > I might get 8-bit arithmetic, or who-knows-what. And why should it matter ? If your specification is to cover that range, a compiler is meeting that specification even if it converts it to BCD to accomplish it on some _very_ old hardware. Larry Kilgallen