Colon syntax minor inelegance
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Colon syntax minor inelegance
- From: Guy Banay <lists.h0lyd4wg@...>
- Date: 2011年1月26日 19:36:58 +0200
Since foo:bar() is equivalent to foo.bar(foo) , I expected the following code:
f = foo:bar
To do something along the lines of:
f = (function(self) return function() return self:bar() end end)(foo)
In other words, I expect foo:bar to return a function. Is there any
reason why it shouldn't do this?