[Tutor] languages

Bob Gailer bgailer@alum.rpi.edu
Tue Jun 17 11:12:02 2003


--=======3D886E0=======
Content-Type: text/plain; x-avg-checked=avg-ok-1775367A; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 8bit

At 11:52 PM 6/15/2003 -0700, Sean 'Shaleh' Perry wrote:
>[snip]
>A+ is quite odd and requires special fonts just to code in it.  Cobol should
>be dead (old coders from the 70s keeping it alive to stay employed).

I wonder if you are thinking of APL rather than A+. I don't know what A+ 
is, but I earned a good part of my income programming in APL. It uses a lot 
of symbols in place of words for its built-in functions. Once we knew the 
meaning of the symbols we could write (and read) code fast. All variables 
were arrays, and functions operated on arrays. Thus no need for special 
statements to implement loops over arrays.

Example:

in Python, the tersest way I know to get the average of a list of numbers:

 >>> import operator
 >>> numbers = [1,3,5,3,6,7]
 >>> reduce(operator.add, numbers)/len(numbers)
4

in APL:

       numbers <-1 3 5 3 6 7
       (+/numbers)/&numbers
4

(Since I don't have the APL font handy I've used & instead of the Greek 
letter rho; <- in place of a single stroke left arrow).

So I enjoy Python because its easy to create and manipulate lists, and 
translate some of my APL knowledge into Pythonic "equivalents".

Bob Gailer
bgailer@alum.rpi.edu
303 442 2625

--=======3D886E0=======
Content-Type: text/plain; charset=us-ascii; x-avg=cert; x-avg-checked=avg-ok-1775367A
Content-Disposition: inline


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.488 / Virus Database: 287 - Release Date: 6/5/2003

--=======3D886E0=======--