[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] Feature suggestion: multiple function arguments

From: Elias Mårtenson
Subject: Re: [Bug-apl] Feature suggestion: multiple function arguments
Date: Wed, 16 Mar 2016 13:17:36 +0800

On 16 March 2016 at 09:23, David B. Lamkins <address@hidden> wrote:
On Tue, Mar 15, 2016 at 11:35:59AM +0800, Elias Mårtenson wrote:
The lexical rewriter could be a plugin, but it could also be an APL function. Imagine being able to assign an APL function to quad-SOMETHINGOROTHER to define your own local syntax. You'd still be running APL2 code under the covers, but you'd be able to define your own syntax for anything that can be rewritten (presumably less conveniently) in APL2. Remember that the rewriter would have full access to the underlying APL2 interpreter, so you'd be able write entire programs to support the processing of some new syntax.

(If the above sounds familiar, it's probably because it's an amalgamation of ideas from Lisp.)

It does indeed sound a lot like Lisp form rewriting. I'm all for this idea, and I'd be willing to make a test implementation of it, as long as someone (else) can can come up with a decent way of actually create a way to unambiguously state the input to be transformed (the equivalent of the DEFMACRO destructuring form in Lisp).
Also, quad-SOMETHINGOROTHER would be a nightmare in shared code unless there was a good way to support localization (in the APL sense, not the I18N sense).

The extensions would be part of the program itself, just like in Lisp. I don't see a problem here.
>    Jürgen has previously explained that there are technical difficulties
>    in expanding the character repertoire outside 255 characters, but I
>    still feel this is one old limitation that deserves being eliminated.

I understand why we need to limit quad-AV to 256 elements. But what about composed characters? Would it be enough to alias the Unicode "compose" codepoint to the ASCII "backspace" (that is already, I'm assuming, in quad-AV...)?

I'm not entirely sure why Quad-AV even needs to exist in a modern program? We should be able to use all of Unicode to name our functions.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]