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: 109fba,b87849933931bc93 X-Google-Attributes: gid109fba,public X-Google-Thread: fac41,b87849933931bc93 X-Google-Attributes: gidfac41,public X-Google-Thread: 1108a1,b87849933931bc93 X-Google-Attributes: gid1108a1,public X-Google-Thread: 114809,b87849933931bc93 X-Google-Attributes: gid114809,public X-Google-Thread: 103376,b87849933931bc93 X-Google-Attributes: gid103376,public From: Mike Klein Subject: Re: OO, C++, and something much better! Date: 1997/02/19 Message-ID: <330B8FE2.187C@alumni.caltech.edu>#1/1 X-Deja-AN: 220192024 References: <5de62l$f13$1@goanna.cs.rmit.edu.au> <32FB8B51.1759@concentric.net> <3302DB3E.F70@concentric.net> Content-Type: text/plain; charset=us-ascii Organization: Codehenge Mime-Version: 1.0 Newsgroups: comp.lang.c++,comp.lang.smalltalk,comp.lang.eiffel,comp.lang.ada,comp.object X-Mailer: Mozilla 3.01Gold (X11; I; SunOS 5.5 sun4u) Date: 1997-02-19T00:00:00+00:00 List-Id: [SNIP] Let us suppose one wants to reason about ints (meaning modulo 2^n integers ala C) in a system which actually has an implementation of integers (bignums, or whatever). If I see code like: int i,j,k; ... (1) i = j + k; I can choose A) Think of the '+' in (1) as the operation: (i plus j) modulo n where i, j, and k are mathematical integers. or B) Think of the '+' in (1) as polymorphic addition operation in a domain different than the integers, i.e. the group of modular integers The problem with choosing interpretation B is that operators like < Are difficult to define in any meaningful way, let alone a way that matches any computer implementation I know of. -- mailto:mklein@alumni.caltech.edu http://www.alumni.caltech.edu/~mklein