lua-users home
lua-l archive

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

The same reason why we have : in the first place.
Taking self twice might be complicated if the variable not on stack.

Picture this:, ...)
you have to get the value d twice, when colon operator copies the left value to the stack again
On 23 Feb 2023, 03:22 +0300, Gé Weijers <>, wrote:

On Wed, Feb 22, 2023 at 8:18 AM tDwtp <> wrote:

Hello, lua-l. (this time correct way around)

TL;DR: I do 2 proposals, this is the second.
I want to make `self:[key](...)` work.

Why not use:
self[key](self, ...)

I don't think there's enough of an advantage here to change the language.