lua-users home
lua-l archive

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

On Sat, May 2, 2009 at 7:50 PM, David Manura <> wrote:
> Caching of the first function goes against dynamic binding.

Yes, tho this is one of those performance trade-offs. I can't off-hand
think of a transparent notation to control this.

> It would be nice to be able to switch between a sequence and table
> implementation merely by switching the implementation of S (as memory
> and performance requirements change).

Totally. A sequence chain would typically end with :copy(), and then
we continue the chain using a table adapter.

> The method chaining can also be made to have the semantics of Forth
> (the input to each filter being the previous stack).

There's promise in this idea - Forth has been on my mind recently,
although my experiences with it were similar to APL (easy to write,
hard to read later)

> This would also allow non-alphanumeric method names:
> z = N(x):['2 * x^y'](n):['x + 1/x']()()

Especially if there was implied mapping on sequences/tables

steve d.