Differences between revisions 1 and 2
Revision 1 as of 2007-03-07 16:31:41
Size: 1705
Comment:
Revision 2 as of 2007-03-07 16:33:13
Size: 1784
Comment:
Deletions are marked like this. Additions are marked like this.
Line 15: Line 15:
The single-character APL glyphs have frequently been cited as evidence of APL being unintelligible, or “a write-only language”. (Do Regular Expressions attract similar comment?) The single-character APL glyphs have frequently been cited as evidence of APL being unintelligible, or “a write-only language”. (Do [http://en.wikipedia.org/wiki/Regular_expression Regular Expressions] attract similar comment?)
Line 25: Line 25:
The density of APL expressions helps writers identify and accumulate abstractions, a crucial part of refactoring. The density of APL expressions helps writers identify and accumulate abstractions, a crucial part of [wiki:WikiPedia/Refactoring refactoring].

A Shocking Brevity

APL (A Programming Language) takes its name from the eponymous book in which Ken Iverson, then teaching mathematics at Harvard, introduced his revised notation for linear algebra. From Harvard he became an IBM Fellow. At IBM, ‘Iverson notation’ became A Programming Language, distinguished by a shocking brevity.

This brevity originates in

  • applying functions to arrays of values, abstracting away the work of controlling loops and counters;
  • single-character glyphs used to represent primitive functions;
  • weak data-typing, so that a small number of powerful primitive functions generalise over many kinds of data.

It leads to a fast, informal and exploratory style of programming quite unlike the ‘waterfall’ approach of Software Engineering.

Strange Symbols

The single-character APL glyphs have frequently been cited as evidence of APL being unintelligible, or “a write-only language”. (Do [http://en.wikipedia.org/wiki/Regular_expression Regular Expressions] attract similar comment?)

The glyphs are largely unnecessary and can easily be replaced by reserved words. This can be helpful for a novice who wishes to separate learning syntax and semantics from mastering a keyboard mapping. However most writers prefer the ‘power shorthand’. For example, in J:

  • +/%#

rather than

  • sum divide tally

The density of APL expressions helps writers identify and accumulate abstractions, a crucial part of [wiki:WikiPedia/Refactoring refactoring].

It is possible to write as unintelligibly in the APLs as it is in Java or English. But APL’s great expressiveness also allows solutions of great simplicity and clarity.

» [:DiscoveringApl/SomeAplExamples:Some APL examples]

DiscoveringApl/ShockingBrevity (last edited 2008-08-20 18:57:19 by anonymous)