Shortcut operators (was Re: [MATRIX-SIG] random number generator?)

John Turner turner@blueskystudios.com
Wed, 29 Oct 1997 18:15:57 -0500


James A. Crotinger writes:

 > At 01:22 PM 10/29/97 -0800, Paul F. Dubois wrote:
 > 
 > > C++ does indeed have the ability to make a = a + 1 and a++ and
 > > a += 1 all come out differently. Pardon me if I do not consider
 > > this a good thing.
 > 
 > Fortran has the ability to have:
 > 
 >   a = add_one(a)
 >   a = sum(a,1)
 >   call increment_by_one(a)
 > 
 > all come out differently as well. One can do stupid things in any
 > programming language. 8-)

And with F90 you can overload intrinsic operators (e.g. +) and/or
assignment (=), so you can blow away chunks of your lower limbs almost 
as large as with C++.  However, you are only allowed to extend the
meaning of an intrinsic operator, not change its meaning for
instrinsic data types.

However, this is becoming increasingly unrelated to NumPy and the
original issue...

-- 
John A. Turner                       mailto:turner@blueskystudios.com
Senior Research Associate            http://www.blueskystudios.com
Blue Sky | VIFX                      http://www.vifx.com
One South Road, Harrison, NY 10528   http://www.lanl.gov/home/turner
Phone: 914-381-8400                  Fax: 914-381-9790/1

_______________
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
_______________