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: fac41,b87849933931bc93 X-Google-Attributes: gidfac41,public X-Google-Thread: f43e6,b87849933931bc93 X-Google-Attributes: gidf43e6,public X-Google-Thread: 103376,b87849933931bc93 X-Google-Attributes: gid103376,public X-Google-Thread: 1108a1,b87849933931bc93 X-Google-Attributes: gid1108a1,public X-Google-Thread: 109fba,b87849933931bc93 X-Google-Attributes: gid109fba,public X-Google-Thread: 114809,b87849933931bc93 X-Google-Attributes: gid114809,public From: "Stanley R. Allen" Subject: Re: OO, C++, and something much better! Date: 1997/01/29 Message-ID: <32EFB711.2781@hso.link.com>#1/1 X-Deja-AN: 213064111 references: <32DF458F.4D5C@concentric.net> <32DF94DC.6FF8@watson.ibm.com> <32DFD972.37E4@concentric.net> <32E4FC5B.242C@watson.ibm.com> <32E7DACB.423@jmpstart.com> cc: James O'Connor content-type: text/plain; charset=us-ascii organization: NASA/Johnson Space Center mime-version: 1.0 newsgroups: comp.lang.c++,comp.lang.smalltalk,comp.lang.eiffel,comp.lang.ada,comp.object,comp.software-eng x-mailer: Mozilla 3.0 (X11; I; IRIX 5.3 IP19) Date: 1997-01-29T00:00:00+00:00 List-Id: James O'Connor wrote: > > [...] I actually had an Ada83 > program that blew up at runtime precisely because it was strong-typed. > The designer had put an upper limit on a type, based on real-world > conditions. That upper limit didn't really mean anything, we didn't > care about what it was. It just happaned to be a high enough value that > the designer thought would be sufficient. The designer was wrong, the > real world changed, conditions were different, and the system crashed > because a totally meaningless limit was placed on a value in obediance > to the typing system. If that had been in Smalltalk, the value would > have rolled over from Integer to LargeInteger and gone right along > without caring (because we didn't care either, and neither did the > use...until it crashed). > That was when I stopped trusting the typing system. > This was obviously a design error, not a fault of static typing or Ada83's version of it. The telling statements are "the upper limit didn't really mean anything", and "the designer thought it would be sufficient". Your specific complaint is really that Ada83 did not provide an automatic roll-over capability for integers as part of the language. If that's the kind of thing you want (a design question), you can achieve it in many statically-type languages; it can easily be done in Ada83 or Ada95 using a pacakge with a private type and overloaded operators. -- Stanley Allen mailto:s_allen@hso.link.com "The Road Ahead": perspectives from one of capitalism's winners.