[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Could we have elegant version requirement from 5.3 on?
- From: Enrico Colombini <erix@...>
- Date: Wed, 26 Mar 2014 22:50:52 +0100
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)