lua-users home
lua-l archive

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


Axel Kittenberger <axkibe@gmail.com> writes:

>> table.sort does not return the table to avoid giving the impression that
>> it creates a new table. In other words, it stresses the point that the
>> sort in performed in place.
>
> I wonder, isn't this paradox to the notion that that is otherwise
> uttered many times on the list, and here likely the rather dominant
> way of thinking:  "If you don't read the manual carefully, it is your
> fault" (# operator, nil vs none discussion, assigning loop variables,
> etc). Compared to worry about intention/impression in this case.

There is a difference between picking the more confusing of two
technically equivalent options, or picking the technically better option
and document its potential for confusion.

-- 
David Kastrup