Re: Definable operators

hrubin@stat.purdue.edu (Herman Rubin)
11 Apr 1997 00:05:22 -0400

          From comp.compilers

Related articles
[9 earlier articles]
Re: Definable operators sethml@ugcs.caltech.edu (1997-03-31)
Re: Definable operators rivetchuck@aol.com (1997-04-02)
Re: Definable operators Dave@occl-cam.demon.co.uk (Dave Lloyd) (1997-04-02)
Re: Definable operators burley@gnu.ai.mit.edu (Craig Burley) (1997-04-03)
Re: Definable operators rideau@ens.fr (Francois-Rene Rideau) (1997-04-03)
Re: Definable operators leichter@smarts.com (Jerry Leichter) (1997-04-06)
Re: Definable operators hrubin@stat.purdue.edu (1997-04-11)
Re: Definable operators nmm1@cus.cam.ac.uk (1997-04-16)
Re: Definable operators raw@math.wisc.edu (Matthew J. Raw) (1997-04-16)
Re: Definable operators dlester@cs.man.ac.uk (1997-04-16)
Re: Definable operators fanf@lspace.org (Tony Finch) (1997-04-18)
Re: Definable operators monnier+/news/comp/compilers@tequila.cs.yale.edu (Stefan Monnier) (1997-04-18)
Re: Definable operators burley@tweedledumb.cygnus.com (Craig Burley) (1997-04-18)
[22 later articles]
| List of all articles for this month |
From: hrubin@stat.purdue.edu (Herman Rubin)
Newsgroups: comp.compilers,comp.lang.misc
Date: 11 Apr 1997 00:05:22 -0400
Organization: Purdue University Statistics Department
References: 97-03-037 97-03-162 97-04-018 97-04-034
Keywords: syntax, design

Jerry Leichter <leichter@smarts.com> wrote:


..................


> 2. For operators that either have no widely-used meaning at
> all, or have a limited meaning, just about any
> *self-consistent* usage is OK. The use of << and >>
> for I/O in C++ are a good example: << and >> are
> rare in mathematics ("much less than/greater than"),
> and that meaning is unlikely to be significant in
> programming usage. Shifting isn't all that common
> an operation in C or C++, and has no properties (like
> commutativity or associativity) that anyone thinks
> about. So giving these operators entirely new meanings
> makes perfect sense.


The claim that shifting is "not that common" is questionable. I have
used it much more for other purposes than I have done other than
simple formatted I/O, for which it is not needed.


This is one of the problems of language designers and compiler
writers, and even for hardware designers. It is often quite easy to
put something in at design time, and quite difficult to find a
work-around later. It is quite easy to destroy common notation for
computer purposes, and hard to get it back.
--
Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907-1399
hrubin@stat.purdue.edu Phone: (765)494-6054 FAX: (765)494-0558
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.