APLXTM : New features in Version 5
MicroAPL is proud to announce the latest release of its APL interpreter, APLX Version 5 for Windows, MacOS and Linux. To upgrade an existing copy, or purchase a new copy, please visit our Buy APLX page. To download a free Demo version, please visit our Downloads page.
Note: Copies of APLX Version 4 bought after 1st April 2009 are eligible for a free upgrade to Version 5.
This is a brief summary of what is new in APLX Version 5 compared with Version 4. For full details, see the New Features in Version 5.0 document. (PDF format, 1.7MB). You can also watch on-line Richard Nabavi's presentation Mixing it all together with APLX Version 5, given at the BAPLA Conference in June.
Performance profiling can be used to find out which parts of your APL code take the most time to execute, or are executed most often, and so helps you to determine which functions to concentrate on when optimising performance. You can view the performance data in a number of different ways, and easily 'drill down' to get more detail on exactly where execution time is spent. APLX Version 5 introduces a very easy-to-use menu-based profiling facility, or, for more detailed control, a new system function
Function, Workspace and Text Comparison
APLX Version 5 includes a powerful new facility for comparing and/or merging:
In each case, you see all the differences in a two-pane display, and optionally copy across changes from one of the versions (the source) to the other (the destination):
The new APLX Scrapbook facility is designed to make it easy for you to re-use code snippets. It includes the Finnish APL Association idiom list (by kind permission of FinnAPL), and also a facility for adding your own text cuttings.
White Space Retention
In versions of APLX prior to version 5, the interpreter automatically strips out unnecessary blank space within lines of code in functions, operators, and methods (other than before comments). It also strips out empty lines.
Version 5 includes a new option which causes the interpreter to keep a copy of the exact layout seen in the editor window when you saved the function. This enables you to lay out the code exactly as you wish.
Object-Oriented Programming: Mixins
Classes which you write in APLX can inherit from other classes; this means that the methods and properties of the parent class (or classes) are available in the child class.
Although the concept of inheritance is very powerful, there are some circumstances where more flexibility is required. In APLX, a class cannot inherit from multiple different classes, only from one parent class (although that might itself inherit from its parent, and so on). Nor can a class inherit from an external class; for example, you cannot write an APL class which directly inherits from a Java class.
The new 'Mixins' facility addresses both of these requirements. Mixins allow you to extend your user-defined classes so that, at run-time, they dynamically 'mix in' functionality (i.e. methods and properties, and perhaps events) from one or more other classes; these can be internal (user-defined, and written in APL), or external (.Net, Java, Ruby etc, or a built-in APLX system class).
Because mixins are attached dynamically at runtime, they are very flexible. For example, in a commercial application you might have an Invoice class (which perhaps inherits from an AccountingDocument class). If you wanted to add functionality which would allow the Invoice class to be faxed or e-mailed to the client, you could dynamically (at run time) mix-in a Fax or EMail class to handle the transmission of the document. This is similar to multiple inheritance as implemented in some other languages, but more flexible because you don't need to know in advance which mixin will be required; different instances of the same class can, if appropriate, mix-in different classes.
When you 'mix-in' another class, what effectively happens is that a new object of the mixed-in class is created, and merged into the original object. The public properties and methods of the mixed-in class now become available in the original object, very much as though they were defined in the original class.
You can mix-in as many other classes as you like; you can even mix in classes from multiple different architectures. For example, you could write (in APL) a FinancialClock class to display the time in London, New York and Singapore. It could mix-in the System Class Window for the display, and the Java class timeZone to handle the different time-zone information.
New external class interface: R Statistical Software
APLX Version 4 introduced object-oriented APL programming using classes and objects, and also implemented a unique external class interface which allows the APL programmer to make use of classes written in other object-oriented environments, in particular .Net, Java and Ruby.
APLX Version 5 adds a fourth external interface, to the R statistical language and set of statistical packages. Although R is not a full object-oriented language, the same object-based interface makes it very easy to use from APLX.
R is an open-source language and set of packages aimed principally at statistical analysis. It includes a huge library of pre-written statistical and mathematical routines, which can be accessed immediately and very conveniently from APLX. It also includes mathematically-oriented graphing facilities, and support for complex numbers. For more details on R, see: http://www.r-project.org. You can also watch on-line Simon Marsden's presentation APLX and R Statistics given at the BAPLA Conference in June 2009, or read about it in Vector
New Primitive Functions
APLX Version 5 introduces the following new primitive functions:
XML Conversion Facilities
A new system function
Other New and Enhanced System Functions
The following system functions are either new or are enhanced in Version 5:
Enhancements to System Classes
Component File Systems
APLX Version 5 increases the maximum size of 32-bit component files to 1024GB (the same as 64-bit implementations of APLX).
Bug Reports and Comments
We welcome any comments you have about APLX Version 5, and any bug reports. Please use our on-line form to let us know.
Copyright © 1996-2009 MicroAPL Ltd