[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: first class ':'
- From: steve donovan <steve.j.donovan@...>
- Date: Wed, 16 Sep 2009 19:09:51 +0200
On Wed, Sep 16, 2009 at 6:41 PM, Eduardo Ochs <eduardoochs@gmail.com> wrote:
> When functions have a metatable and when that metatable has a field
> "__colon", then the expression
>
> f:method
>
> without an argument list, of course, would just return the result of:
>
> getmetatable(f).__colon(f, "method")
But this would be a runtime thing, not a compile-time transformation.
So there would have to be some bytecode representation of 'f:method'
(without parens) whereas 'f:method()' has been simply transformed into
a table lookup and a function call.
Man, I can see many opportunities for confusion!
steve d.
- References:
- Regarding the name 'pairs', TNHarris
- Re: Regarding the name 'pairs', TNHarris
- Re: Regarding the name 'pairs', Miles Bader
- Re: Regarding the name 'pairs', Luiz Henrique de Figueiredo
- Re: Regarding the name 'pairs', steve donovan
- Re: Regarding the name 'pairs', Roberto Ierusalimschy
- Re: first class ':', froese
- Re: first class ':', David Kastrup
- Re: first class ':', steve donovan
- Re: first class ':', Eduardo Ochs