Newsgroups: comp.lang.c++,comp.lang.smalltalk,comp.lang.eiffel,comp.lang.ada,comp.object
Path: cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!nntp.sei.cmu.edu!news.cis.ohio-state.edu!math.ohio-state.edu!feeder.chicago.cic.net!ftpbox!mothost.mot.com!schbbs!news
From: shang@corp.mot.com (David L. Shang)
Subject: Re: Definition of "operator" (was: OO, C++, and something much better!)
Reply-To: shang@corp.mot.com
Organization: MOTOROLA 
Date: Mon, 24 Feb 1997 15:28:43 GMT
Message-ID: <1997Feb24.152843.10394@schbbs.mot.com>
References: <3310948B.29C1@earthlink.net>
Sender: news@schbbs.mot.com (SCHBBS News Account)
Nntp-Posting-Host: 129.188.128.126
Lines: 44
Xref: glinda.oz.cs.cmu.edu comp.lang.c++:250002 comp.lang.smalltalk:52144 comp.lang.eiffel:18659 comp.lang.ada:57927 comp.object:61569

In article <3310948B.29C1@earthlink.net> Richard Katz <richkatz@earthlink.net>  
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
