On 2014-05-27 18:06:06, Juergen Sauermann wrote: > Note that there are some subtle differences between IBM APL2 and GNU APL > when localizing ⎕-vars. In IBM APL2 they are undefined after localizing > them. > In GNU APL they are pre-initialized with their respective default values. > This > gives simpler (and therefore faster code) because no check for validity is > needed > for the variables themselves, but also for the many internal users of them.
This indeed makes things simpler and I like the idea, but APL2's behavior is mandated by ISO 13751 which at the beginning of chapter 12 says: > Note: When a system-variable-symbol is localised the initial class of > its associated system-parameter is nil. If a primitive operation is > invoked that requires a system parameter whose class is currently nil, > the primitive operation signals implicit-error. Therefore, a > conforming-program that localises system-variable-symbols should > assign them values from their internal-value-set before calling > primitive operations that require them. -k