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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 107f24,626a0a064b320310 X-Google-Attributes: gid107f24,public X-Google-Thread: f4fd2,626a0a064b320310 X-Google-Attributes: gidf4fd2,public X-Google-Thread: 1164ba,626a0a064b320310 X-Google-Attributes: gid1164ba,public X-Google-Thread: 10259a,626a0a064b320310 X-Google-Attributes: gid10259a,public X-Google-Thread: 103d24,626a0a064b320310 X-Google-Attributes: gid103d24,public X-Google-Thread: 103376,ea8ea502d35ca2ce X-Google-Attributes: gid103376,public X-Google-Thread: 114809,626a0a064b320310 X-Google-Attributes: gid114809,public X-Google-ArrivalTime: 2001-06-02 08:46:41 PST Path: archiver1.google.com!newsfeed.google.com!sn-xit-02!sn-xit-03!supernews.com!cyclone-sjo1.usenetserver.com!news-out-sjo.usenetserver.com!feed.news.qwest.net!news.uswest.net.POSTED!not-for-mail From: "Frank A. Adrian" Newsgroups: comp.lang.ada,comp.lang.lisp,comp.lang.smalltalk,comp.lang.basic,comp.lang.functional,comp.lang.scheme,comp.lang.perl References: Subject: Re: Beginner's Language? X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: Date: Sat, 2 Jun 2001 08:46:38 -0700 NNTP-Posting-Host: 63.229.134.157 X-Trace: news.uswest.net 991496799 63.229.134.157 (Sat, 02 Jun 2001 10:46:39 CDT) NNTP-Posting-Date: Sat, 02 Jun 2001 10:46:39 CDT Xref: archiver1.google.com comp.lang.ada:8018 comp.lang.lisp:11219 comp.lang.smalltalk:10448 comp.lang.functional:6048 comp.lang.scheme:4106 comp.lang.perl:3128 Date: 2001-06-02T08:46:38-07:00 List-Id: Yes, I was talking about the set of integers. Most languages call the type something based on the word integer, leading the user to assume that one is, in fact, working with an element from that set. Although you are correct that it is sometime desirable to work with elements from alternative sets, I would also think that this is not the norm and that it would be better to actually declare the variables whose values are taken from these sets as such and not simply let the user to stumble upon the fact willy-nilly. One could also make a case that one should not canonize the size of these elements, defined by accident of hardware, but instead provide a specific data-type for any integral sub-ring the user desires. But then, that would ask the language designers and compiler writers to actually sweat the details. Worse is better may be a model of what is, but it doesn't have to be a model of what will be... faa "Johan Kullstam" wrote in message news:m2snhjuhp2.fsf@euler.axel.nom... > "Frank A. Adrian" writes: > > > P.S. Any language where you can add two positive numbers together and get a > > negative number is inherently broken. > > it depends upon what you mean by "number" and what you mean by > "negative". sometimes you really do want to work in the ring > Z_{2^32}. e.g., i often represent angles in terms of 2^32 quanta per > revolution. when the 32 bit "int" wraps, so does the angle -- > exactly as intended. > > i agree that it is a pain to have no way to use integers Z, but are > forced to choose among Z_{2^N} for a few ill-defined choices of N. > > > It is a sign of the language designer and compiler writer choosing > > their own convenience over yours. > > -- > J o h a n K u l l s t a m > [kullstam@ne.mediaone.net] > Don't Fear the Penguin! >