lua-users home
lua-l archive

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

On Sun, Apr 10, 2011 at 08:37:25AM +0200, Lorenzo Donati wrote:
> >
> Yes. I know that. But I avoid like the plauge to redefine standard 
> libraries functions (even in short scopes - it's about readability). 
Python does the various sorting options neatly: a.sort() sorts a in
place, sorted(a) returns a new array containing the sorted version
without disturbing the original.  OK, Python is a fat API, but that 
sort of distinction aids clarity.

Your argument against Sean's local redefinition of table.sort() does not
apply to making a new table.sorted().

> The argument of Luiz, while in general is really sound 
As arguments of Luiz and Roberto tend to be :-)