Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mstan!amull From: amull@Morgan.COM (Andrew P. Mullhaupt) Newsgroups: comp.lang.misc Subject: Re: The Fundamental Concept of Programming language X Summary: Operators in New APL's Keywords: programming languages, abstractions Message-ID: <666@s5.Morgan.COM> Date: 11 Jan 90 05:50:53 GMT References: <1470@mdbs.UUCP> <1782@aipna.ed.ac.uk> <2886@water.waterloo.edu> <1532@castle.ed.ac.uk> Organization: Morgan Stanley & Co. NY, NY Lines: 30 In article <1532@castle.ed.ac.uk>, nick@lfcs.ed.ac.uk (Nick Rothwell) writes: > > Why are "operators" different to functions? The situation is much like that in APL2, to wit: They can have functions as arguments. The result of an operator is (can be) a function suitable for use as an argument to another operator. The exceptions in APL are "jot" which is not any kind of thing, (it only exists as part of the "jot-dot" operator), and slash, which is the symbol for both "compress" (a function) and "reduce" (an operator). (A mistake graven in stone by now...) Functions, therefore, are not 'first class data' since the functions which operate on them are not functions. (This is a lot like Lisp). > > What do you do about full higher-order facilities (e.g. higher-order > functions returning higher-order functions)? "adadadadadverbs"? > I think here, the APL2 answer is that you don't. Operators are not (so far as I can tell) legitimate areguments to other operators. The reason for this is not unlike what you have guessed - you cannot express the definition of an "operator on operators" in the present syntax. English is not so limited; things which modify adverbs are very frequently adjectives. Later, Andrew Mullhaupt > Nick.