lua-users home
lua-l archive

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


On 20/10/15 03:10 PM, Dirk Laurie wrote:
> 2015-10-20 18:34 GMT+02:00 Soni L. <fakedme@gmail.com>:
>> On 20/10/15 02:00 PM, Andrew Starks wrote:
>>> My biggest complaint, and it is a very small critique, is simply the 
>>> awkwardness of typing `select('#', ...)`. `#(...)` would be nicer to 
>>> type, but the implications of this are not known to me.
>> `#...` would be nicer to type, `(...)` is an expression so `#(...)` 
>> actually returns the length of the first value in `...` (just like 
>> the current
>> `#...`)
> `##` would be even nicer to type.
>
> Tom has pointed out that my suggestion that #index becomes a `select` 
> shorthand when index is an integer is unimplementable, but for numeric 
> literals #1, #2 etc it is possible. (And in Ravi, of
> course.)
>
[JH] IMHO  '#...' should be sugar for 'select(#, ...)' and '...[n]' sugar
for '(select(n, ...))'.
As well as being syntactically neater, this should allow implementation
optimisations.



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus