lua-users home
lua-l archive

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


On 26/03/2014 22.13, Tim Hill wrote:
Version number checking is a mine-field, and should be avoided
whenever possible. First, code rarely needs to know version
information, it’s typically checking for*feature*  support indirectly
via the logic “Feature K is supported in Lua X.Y, therefore to check
for feature K check for Lua X.Y”. it’s far far better to have a
mechanism that directly checks for feature support and bypasses the
indirect logic entirely.

However, this would not cover the case where a version has the same function but with a different signature (for example, an extra argument).

(no, I have no magic solution)

--
  Enrico