Why no syntax sugar for function object?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Why no syntax sugar for function object?
- From: Dirk Laurie <dirk.laurie@...>
- Date: 2012年4月20日 17:17:45 +0200
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?