Discovering APL <<

Why vector languages?

Distinct from object-orientation, currently the most popular abstraction paradigm for software developers, array-orientation is an older paradigm, closely associated with functional programming, that offers different powers. Just as Vector languages have been extended to facilitate object-oriented programming, so array-oriented extensions are available for OO languages such as Java and C++. From the Vector languages, OO programmers can learn powerful techniques.

Interpreters for the Vector languages have always had managed code (managing machine details), to let the programmer focus on more abstract issues. Their low housekeeping and interactive development environments make them languages of choice for many programmers pressed for time. Not surprisingly, Vector languages have a long association with agile or lightweight software development.

Arrays and lists are what Vector languages do best. Nowhere is this more evident than in processing the long timeseries created from financial market datafeeds. On these problems Vector language Q and its kdb database routinely outperform conventional databases by factors of 20-50.

An example of programming in Q demonstrates how Vector languages change the way you think, even about scalar (non-array) problems. A recent review of .NET language implementations compared handcoded solutions to a standard 'benchmark' programming problem. The reviewer's solutions to this scalar problem all ran to about 400 lines of code and took 9-20 seconds to execute on an 800MHz PC. A solution in Q dropped execution time by one order of magnitude and code colume by two: four short lines of primitive Q code, no library calls.

The special powers Vector languages have with arrays make it easy to see emerging patterns. For this reason they have long been valued by educators, by scientists needing quickly to explore the implications of a theory, and by mathematicians, for whom they were, after all, first invented.

>> A Shocking Brevity


CategoryAboutApl

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