Operators for everything (was Re: Operators for matrix)

Michael Hudson mwh21 at cam.ac.uk
Sat Jul 22 20:54:48 EDT 2000


digitig at cix.co.uk (Tim Rowe) writes:

> In article <m38zuvny7v.fsf at atrus.jesus.cam.ac.uk>, mwh21 at cam.ac.uk 
> (Michael Hudson) wrote:
> 
> > W.Whiten at mailbox.uq.edu.au (Bill Whiten) writes:
> > 
> 
> <snip>
> 
> > > I would prefer the normal oprerators plus an escape character 
> > > followed by
> > > additional characters to define new operators eg @+ @div etc.
> > 
> > I quite like this idea (unlike most of the others that have been
> > mentioned...); it reminds me of Haskell.
> 
> Ouch -- I don't. The type of an identifier determined by the characters in 
> the identifier, rather than being assigned? That's one of the things I 
> loathe about Perl. And what would a Python identifier be doing, 
> constrained to refer only to one type?

Sorry, but eh?  I fail to understand you, I think.

Example usage of what I'm talking about:

def add(x,y):
    return x + y

1 @add 1
  ==> 2

Now, can you explain your problem again for the hard of thinking?

(I'm not sure that this would make a good addition to Python either,
but I do think it's a better idea than some that have been bandied
around in the last week or so - and that's just the posts I've read)

Cheers,
M.

-- 
41. Some programming languages manage to absorb change, but 
    withstand progress.
  -- Alan Perlis, http://www.cs.yale.edu/homes/perlis-alan/quotes.html



More information about the Python-list mailing list