[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Why no syntax sugar for function object?
- From: Rob Hoelz <rob@...>
- Date: Fri, 20 Apr 2012 11:28:00 -0400
I'm having trouble parsing what you want to do. Do you want to do
something like this:
for x in object:method() do
...
end
-Rob
On Fri, Apr 20, 2012 at 05:17:45PM +0200, Dirk Laurie wrote:
> I can't say:
> for x in f = object:method do
>
> Instead, I must say
> for f in function(...) return object:method(...) end do
>
> The error seems to be at syntax level:
>
> stdin:1: function arguments expected near 'do'
>
> Is there some philosophical reason why this sugar is not available?
>