bug-apl
[Top][All Lists]
Advanced

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

Re: [Bug-apl] Request to add to the ⎕fio[] a 'function_common_name' as


From: Juergen Sauermann
Subject: Re: [Bug-apl] Request to add to the ⎕fio[] a 'function_common_name' as argument
Date: Fri, 6 Jan 2017 20:32:27 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

Hi Elias,

as far as I understand it, first class functions are a property of a language, not of lambdas.

Almost every APL function (the exception being APL operators) expect APL values as argument,
and even if we could pass functions instead of values, these functions would complain with
VALUE ERROR when a function is being passed as arguments. Some operators accept values
for functions, but not the other way around.

Technically speaking we would need to replace all Value_P arguments of all
eval_XXX() functions by Tokens.
Passing of Tokens is more costly than passing Value_Ps, and the advantage for built-in functions would be
zero because none of them can deal with functions in arguments except those that are operators.
And since we have user-defined operators we can at least pass a limited number of functions directly.
If you need more than you can still pass their names and then ⍎ the name when needed.

Also, being able to pass functions wherever currently only values are allowed would, in my opinion,
 create a different language than APL2. It was never my ambition to improve on APL2, but to create a
free and almost compatible replacement for it.

/// Jürgen


On 01/06/2017 06:04 AM, Elias Mårtenson wrote:
On 6 January 2017 at 13:02, Christian Robert <address@hidden> wrote:

never regret Lambdas, in my opinion, it is the best decision you ever did (quite a job on the programmer side). Without it,
I would be on nars2000 or even paying $$$ for Dyalog

I agree with Christian here (even though we disagree wildly on the FILE_IO point :-) ).

I just wish the lambdas were more powerful, being first-class functions.

Regards,
Elias 


reply via email to

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