lua-users home
lua-l archive

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


> P.S. This sort of sequence is one of the places where it would have been really nice if the end of an iteration were signaled by returning nothing rather than by returning nil. There could be map operations, for example, that result in nil where we don't want to actually terminate the iteration.

Allow me to diverge even more with another language change idea:

I wish select('#',...) wouldn't count trailing nils for more symmetry:
 - f() same as f(nil)
 - return nothing same as return nil
 - unpack({...}) same as ...
 - f(unpack(t))

Regarding the iterator protocol, I wish the iterator return a boolean
marker before var1 so that var1 can be nil, but that would break
compatibility :(