Differences between revisions 8 and 9
Revision 8 as of 2007-07-20 13:37:48
Size: 1959
Editor: anonymous
Comment:
Revision 9 as of 2008-08-20 18:57:19
Size: 1960
Editor: anonymous
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
[:DiscoveringApl:Discovering APL] « [:../WhyVectors: Why Vectors?] « [[DiscoveringApl|Discovering APL]] « [[../WhyVectors| Why Vectors?]] «
Line 16: Line 16:
The single-character APL glyphs have frequently been cited as evidence of APL being unintelligible, or “a write-only language”. This can also be said of any unfamiliar language (do [http://en.wikipedia.org/wiki/Regular_expression 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”. This can also be said of any unfamiliar language (do [[http://en.wikipedia.org/wiki/Regular_expression|Regular Expressions]] attract similar comment?)
Line 26: Line 26:
The density of APL expressions helps writers identify and accumulate abstractions, a crucial part of [wiki:WikiPedia/Refactoring refactoring]. The density of APL expressions helps writers identify and accumulate abstractions, a crucial part of [[WikiPedia:Refactoring|refactoring]].
Line 30: Line 30:
» [:../SomeAplExamples:Some APL examples] » [:../AplAndTypography:APL and Typography] » [[../SomeAplExamples|Some APL examples]] » [[../AplAndTypography|APL and Typography]]

Discovering APL « Why Vectors? «

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.

Unusual Symbols

The single-character APL glyphs have frequently been cited as evidence of APL being unintelligible, or “a write-only language”. This can also be said of any unfamiliar language (do 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 refactoring.

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

» Some APL examples » APL and Typography


CategoryAboutApl

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