lua-users home
lua-l archive

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


I'm doing a little bit of work on my autoconf-archive macros for
detecting Lua, ax_lua.m4. At the moment, one of the macros lets you
require a certain range of Lua versions. Looking at the changes to the
language for 5.2, it looks as though it is easily possible to write
scripts that work in both 5.1 and 5.2, and probably quite feasible to
write scripts that work in 5.0-5.2. Hence, arguably, this macro has a
purpose.

However, I'm not aware of much code written this way (though again, it
might become much more common with 5.1-5.2).

I was wondering whether this multi-version support is common-place, or
whether, on the other hand, it is considered bad practice? I was
considering removing the range support and replacing it with a macro
which simply requires a specific version...

For me, the risk of subtle bugs militates against trying to write code
that supports more than one version of Lua, but I'm not working with
code bases that are both large and long-lived.

-- 
http://rrt.sc3d.org