I agree in part. My opinion is that all of these problems would be solvable if immediate lambdas required an explicit function call to be evaluated. I.e. {⍵} 1 should not evaluate to 1, but rather the function itself and the number one. Then, having a separate symbol to force evaluation.
Sadly, this is not the case, of course,so the above is just me dreaming. :-)
That said, I believe that lambdas should be extended to become more "functional" and generic. This includes lexical closures as well as proper first-class functions. To do so, however, would require first looking at how other APL's do it, as there is no reason to reinvent the wheel. Also, there are more important things to do first. :-)
Regards,
Elias
On 29 Jul 2014 20:48, "Juergen Sauermann" <
address@hidden> wrote:
Hi,
I have put the power operator onto my long-term TODO list (aka
README-4-compliance), SVN 402.
BTW the somewhat unexpected behavior of your niladic functions
comes from the IMHO broken syntax
of the rank operator (which allows values where unaware people
would expect functions). Before that
your right lambda would have returned a value and the SEL would
have triggered a syntax error.
My concern in the context of lambdas is that if we drive that too
far then we would create new cases
that nobody can understand anymore.
/// Jürgen
On 07/29/2014 02:11 PM, Elias Mårtenson wrote:
Hmm, so having a right-hand nildaic function passed
to an operator simply doesn't work. Oh well, makes sense once
you think about it. :-)
This was all part of experimentation I was playing around
with while thinking about the power operator. Have you given
that one any thought yet?
Regards,
Elias