lua-users home
lua-l archive

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

On 08/29/2017 10:25 AM, Dirk Laurie wrote:
> 2017-08-29 9:55 GMT+02:00 Eike Decker <>:
>> I think it would work and I think it could be used to great use, but every
>> time I see myself explaining how the colon syntax works I start scratching
>> my head if it isn't just too complicated already...
> Soni's own example, a statement 80 characters long, is actually
> a powerful argument _against_ his own proposal. I stared at, trying
> to see the difference, but it was as hard as those picture games in
> the newspaper where the girl has one slightly smaller polka dot on
> her bikini.

Yes, his example is not obvious but idea is quite simple:
":" means "capture value of expression before ':' and
place it as a first argument in following function call".

Current ":" behavior is same but with strange exclusion:
after ":" must be <name> token. So "a:[2]()" is not valid
but "a:two()" is.

I consider anything that requires less words to explain
more simple and better, so Soni's proposal is good in
my opinion.

-- Martin