It's not a bad idea, it's especially useful for those sequences with nils everyone is rambling on about nowadays. If you have something like
```
t={}
for i,v in ipairs{5,nil,nil,nil,1} do t[i] = v end --needed to mess up the length
```
then table.sort will sort only the first element and you end up with the same table you started with. It's the same thing as with table.unpack: if you have some extra knowledge about the table's length (eg.: extra length field from table.pack or using vararg in 5.1) then you can use that in your sorting algorithm. Of course you would need a comparison function that can deal with nil.