[Haskell-cafe] Unicode Haskell source -- Yippie!

Richard A. O'Keefe ok at cs.otago.ac.nz
Mon Apr 28 02:05:40 UTC 2014

On 26/04/2014, at 1:30 AM, Rustom Mody wrote:
> On Fri, Apr 25, 2014 at 6:32 PM, Chris Warburton <chriswarbo at googlemail.com> wrote:
> Rustom Mody <rustompmody at gmail.com> writes:
> > As for APL, it failed for various reasons eg
> > - mixing up assembly language (straight line code with gotos) with
> > functional idioms
> > - the character set was a major hurdle in the 60s. Thats not an issue today
> > when most OSes/editors are unicode compliant

I strongly suspect that the failure of APL had very little
to do with the character set.  When APL was introduced, the
character set was just a matter of dropping in a different
golf-ball.  Later, it was just bits on a screen.  Heck in
1984 I was using C and LaTeX on an IBM mainframe where the
terminals displayed curly braces as spaces, and oddly enough
that didn't kill C...  In any case, it was possible to enter
any arbitrary APL text using straight ASCII, so that was no
great problem.

There were a number of much more serious issues with APL.

(1) In "classic" APL everything is an n-dimensional array,
either an array of characters or an array of (complex) numbers.
An absolutely regular array.  Want to process a collection of
records where some of the fields are strings?  No can do.
Want to process a collection of strings of different length?
No can do: you must use a 2-dimensional array, padding all
the strings to the same length.  Want type checking?
Hysterical laughter.

APL2 "fixed" this by introducing nested arrays.  This is
powerful, but occasionally clumsy.  And it is positional,
not named.  You *can* represent trees, you can represent
records with mixed fields, you can do all sorts of stuff.
But it's positional, not named.

(2) There aren't _that_ many APL symbols, and it didn't take
too long to learn them, and once you did, they weren't that
hard to remember.  (Although the use of the horseshoe
symbols in APL2 strikes me as *ab*use.) Problem is, a whole
lot of other things were done with numbers.  Here's the
trig functions:
	0 ◦ x		sqrt(1-x**2)
	1 ◦ x		sin x
	¯1 ◦ x		arcsin x
	2 ◦ x		cos x
	¯2 ◦ x		arccos x
	3 ◦ x		tan x
	¯3 ◦ x		arctan x
	4 ◦ x		sqrt(x**2+1)
	¯4 ◦ x		sqrt(x**2-1)
	5 ◦ x		sinh x
	¯5 ◦ x		arcsinh x
	6 ◦ x		cosh x
	¯6 ◦ x		arccosh x
	7 ◦ x		tanh x
	¯7 ◦ x		arctanh x
Who thought _that_ was a good idea?
Well, presumably it was the same person who introduced the
"I-beam functions".  A range of system functions (time of
day, cpu time used, space available, ...) were distinguished
by *numbers*.

(3) Which brings me to the dialect problem.  No two systems
had the *same* set of I-beam functions.  You couldn't even
rely on two systems having the same *kind* of approach to
files.  There were several commercial APL systems, and they
weren't priced for the hobbyist or student.

More information about the Haskell-Cafe mailing list