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: fac41,b87849933931bc93 X-Google-Attributes: gidfac41,public X-Google-Thread: 1108a1,b87849933931bc93 X-Google-Attributes: gid1108a1,public X-Google-Thread: 103376,b87849933931bc93 X-Google-Attributes: gid103376,public X-Google-Thread: 114809,b87849933931bc93 X-Google-Attributes: gid114809,public X-Google-Thread: 109fba,b87849933931bc93 X-Google-Attributes: gid109fba,public From: shang@corp.mot.com (David L. Shang) Subject: Re: Definition of "operator" (was: OO, C++, and something much better!) Date: 1997/02/24 Message-ID: <1997Feb24.152843.10394@schbbs.mot.com>#1/1 X-Deja-AN: 221265801 Sender: news@schbbs.mot.com (SCHBBS News Account) References: <3310948B.29C1@earthlink.net> Organization: MOTOROLA Reply-To: shang@corp.mot.com Newsgroups: comp.lang.c++,comp.lang.smalltalk,comp.lang.eiffel,comp.lang.ada,comp.object Date: 1997-02-24T00:00:00+00:00 List-Id: In article <3310948B.29C1@earthlink.net> Richard Katz writes: > > Whether this needs to be so or not is a matter of language purpose. > Other languages have different purposes and philosophies. Note that the > APL language extends the operator notation but eliminates hierarchy. It > considered that all kinds of operations were symbolized by single or > short multiple characters and could be used as infix or prefix. > Between C and C++ there is a major difference. The "routing" purpose of > operators built into both C and UNIX is extended in C++ so that the > concept of overloading makes operators into methods with different > notation. In the PROLOG language, many non-PROLOG constructs and > operator hierarchies can be represented. > Transframe extents the operator notation further by allowing an arbitory combination of operator strings as well as maintain a hierarchy via a set of priority and association rules. An operator could be prefix or non-prefix (which include infix,surfix, and any other dovetail-style operators). Promotions are defined by mutiple operation interfaces which is also used to replace the contentious concept of overloading. > As a result, my answer to your question becomes: 1) There need be no > fundamental difference between operators and operations. I agree. Operators are not specific built-in things in Transframe. Like other normal operations, they are user-defined, including the format of its usage. For example: function operator repeat (b: block) every (t: float) second () until (k: int) times; This user-defined operator provides a iterative construct that repeats a block statement once every t second(s) until k times. We can have an expression like: repeat { bird.chirp(); bunny.hop(); pig.flop(); } every 0.8 second until 15 times; David Shang