System commands

Author:

Berry Michael J. A.1

Affiliation:

1. Analogic Corporation, Audubon Road, Wakefield, Massachusetts

Abstract

System commands have always had a very important role in, or, more accurately, just outside, the APL language. They are the pidgin dialect which provides communication between the clean, abstract world of pure APL and the often messy environment of the APL system which allows APL programs to be executed. Despite their importance in the development and use of all APL applications, very little attention has been paid to them. They remain, in contrast to APL itself, ineffectual, irregular, and inconsistent. They have no regular syntax and return no usable result. There are two possible ways to deal with this situation. Get rid of them, or make them better. To date, most APL systems have been gradually implementing the first approach. One by one, system commands have been superseded by system functions and variables which do approximately the same thing. In the case of system variables such as □ IO and □ RL whose values effect the actual results of calculations as implicit arguments, this change has properly moved the ability to set these parameters into the province of the language itself. In the case of the system functions, however, the move has blurred the useful distinction between the language and the host environment and introduced a most unattractive collection of obscure English words and abbreviations into a previously ideographic language. By moving the English words out of APL and into the realm of system commands, we open up the possibility of having the actual words used be a function of some natural language selection facility such as □ NLT in IBM's APL2. One of the problems with the □-function approach is that APL functions take data arguments and return data results. This is, of course, what allows them to be used in ever more complex expressions. Unfortunately, since the environmental constructs acted on by system functions are not data, the arguments and results of system functions often bear only slightly on the main action which is taken as a side effect. Another problem is that an APL function works within a certain name environment (workspace), and generally cannot affect things outside of that environment. As large applications increasingly tend to rely on cooperation between many different workspaces, the need to make extra-workspace adjustments to the environment has become apparent. This is especially true in Analogic APL which is designed to facilitate the sharing of both functions and variables between workspaces. Starting a brand new implementation of APL is a great opportunity. We at Analogic decided to take advantage of it by providing a better environment for our favorite language to run in. Our approach was to leave the language proper alone (Analogic is committed to strict adherence to the ISO APL standard), but to rethink the way that APL applications interact with their environment. To take advantage of these enhancements, an applications programmer must set up a variety of links between different workspaces or name contexts. Usually, this only needs to be done once at the time an application is put together. The exact mechanism, called threaded workspaces, is described elsewhere [1]. The important points for this discussion are that the actions generally need not be dynamic and that there are many variations in the details of the connections. We decided that system functions were not the answer. Doing as many things as we envisioned by using system functions would have entitled either an unacceptably large number of confusingly named &squarel-functions (like the 135 found in STSC APL*PLUS/PC) or unacceptably obscure arguments to a smaller number of □-functions (like the left arguments of □ WS and □ FD in Sharp APL). System commands, many of which are already required by the ISO standard, can provide the answer so long as they are given a regular and self-documenting syntax, and the universe of names visible to any command is expanded to include names in workspaces other than the one in which the command is invoked. It should be understood that Analogic APL is a work in progress. The ideas expressed here reflect the current state of the specification of Analogic APL. Details such as the names of individual fields are likely to change as we the implementation progresses and we gather experience.

Publisher

Association for Computing Machinery (ACM)

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3