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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10a146,a03ae7f4e53958e1 X-Google-Attributes: gid10a146,public X-Google-Thread: 1094ba,a03ae7f4e53958e1 X-Google-Attributes: gid1094ba,public X-Google-Thread: 109fba,a03ae7f4e53958e1 X-Google-Attributes: gid109fba,public X-Google-Thread: fa0ae,a03ae7f4e53958e1 X-Google-Attributes: gidfa0ae,public X-Google-Thread: fac41,a03ae7f4e53958e1 X-Google-Attributes: gidfac41,public X-Google-Thread: 103376,8775b19e3c68a5dc X-Google-Attributes: gid103376,public X-Google-Thread: 1014db,a03ae7f4e53958e1 X-Google-Attributes: gid1014db,public X-Google-Thread: 114809,a03ae7f4e53958e1 X-Google-Attributes: gid114809,public From: John Porter Subject: Re: Which language pays most? Smalltalk, not C++ nor Java. Date: 1997/12/31 Message-ID: <34AA8AC7.2A4A@min.net>#1/1 X-Deja-AN: 311693291 Content-Transfer-Encoding: 7bit References: <199712121931.LAA25389@sirius.infonex.com> <685mee$5d4$1@sparcserver.lrz-muenchen.de> <34A812F9.C169A703@its.cl> <68bu22$geg$1@brie.direct.ca> <68c66j$ei3$1@client3.news.psi.net> Content-Type: text/plain; charset=us-ascii Organization: Logicon Mime-Version: 1.0 Reply-To: jdporter@min.net Newsgroups: comp.lang.fortran,comp.lang.c,comp.lang.c++,comp.lang.eiffel,comp.lang.java.programmer,comp.lang.smalltalk,comp.lang.perl.misc,comp.lang.ada,comp.edu Date: 1997-12-31T00:00:00+00:00 List-Id: Dann Corbit wrote: > > Now, with Ada we can simply declare precision, and I will agree this is very > nice. But we can make the same sort of decisions for other languages and use > efficient fixed sizes or new types of our own design. Instead of growing a > bit at a time, we grow in jumps. Now, if I declare a type of 60 bits of > precision, am I guaranteed that it will never overflow? Obviously, I still > have to perform the same analysis that I would need for any other software > system. Getting exactly what you want is much easier, though. > > Exception handling is not perfect a solution either. It is even better to > engineer a solution where the types used never extend beyond the design range. > If there is any possibility that a counter of type short is not large enough, > use long. And if there is any chance that long is too small, use a larger > type or invent one. Same for float, double, long double. Of course in C++ it would be pretty easy to make a class that implements integers of unlimited (dynamic) size. Making it efficient would be a little harder... John Porter