lua-users home
lua-l archive

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


With Lua 5.3 becoming imminent, it seems to have become open season
for re-opening discussions on current library routines that can be improved.
The following routines appear in the 5.2 manual with disclaimers:

1.table.sort (list [, comp]) [1]

The sort algorithm is not stable; that is, elements considered equal by
the given order may have their relative positions changed by the sort.

2. math.random ([m [, n]]) [2]

No guarantees can be given for its statistical properties.

3. io.popen (prog [, mode])

This function is system dependent and is not available on all platforms.

4. os.date ([format [, time]])

On non-Posix systems, this function may be not thread safe because of
its reliance on C function gmtime and C function localtime.

5. os.setlocale (locale [, category])

This function may be not thread safe because of its reliance on C function
setlocale.

6. os.time ([table])

In other systems, the meaning is not specified, and the number returned
by time can be used only as an argument to os.date and os.difftime.

Perhaps another look could be taken at these with a view to deciding
whether improvements are feasible.

[1] There has been a discussion on this topic.
http://lua-users.org/lists/lua-l/2013-05/msg00038.html

[2] Currently being actively discussed.