lua-users home
lua-l archive

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

Le lun. 1 juil. 2019 à 00:06, Sergey Kovalev <> a écrit :
> Counter proposal:
>     f1 !  expression2 ! expression1
> or
>    f1 ! (_expression_-list2) ! (_expression_-list1)
> creates a anonymous function and you can call it with one or more parameters, and where express2 can be a function or simple value, or a list of expressions...

It's too complex. It just special symbol to identify next _expression_
is function like quotes or braces.

Not at all, it simplifies a lot of things. It's not just syntaxic sugar like what you propose (which is incoherent) but implements the mathematical composition and filters. It allows functional programming, it can be used for multi-layered parsers, for safe I/O, for handling errors as return values instead of exceptions.

What you propose is just syntaxic sugar, but with additional ambiguities.