[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: module _VERSION number scheme proposal
- From: David Manura <dm.lua@...>
- Date: Thu, 10 Nov 2011 21:28:15 -0500
On Thu, Nov 10, 2011 at 5:32 AM, Michael Richter <ttmrichter@gmail.com> wrote:
> On 10 November 2011 18:02, Duncan Cross <duncan.cross@gmail.com> wrote:
>> >> Tables and hashes aren't easily comparable.
>> > They are if you provide the metatable with comparison operators.
>> The comparison metamethods are only consulted if both values are of
>> the same basic type, so even with those you cannot make a table == a
>> string.
> And we're back to the string fetish. Why would I want to compare a table to
> a string if I've got the tables?
In 5.2.0-beta, `table < string` does consult the metatable [1] (why?).
However, perhaps confusingly, `table == string` does not. So,
comparing version tables with strings would be error prone.
[1] http://www.lua.org/work/doc/manual.html#2.4
- References:
- module _VERSION number scheme proposal, David Manura
- Re: module _VERSION number scheme proposal, Daurnimator
- Re: module _VERSION number scheme proposal, Vadim Peretokin
- Re: module _VERSION number scheme proposal, David Manura
- Re: module _VERSION number scheme proposal, Tony Finch
- Re: module _VERSION number scheme proposal, Michael Richter
- Re: module _VERSION number scheme proposal, Michael Richter
- Re: module _VERSION number scheme proposal, David Hollander
- Re: module _VERSION number scheme proposal, HyperHacker
- Re: module _VERSION number scheme proposal, Michael Richter
- Re: module _VERSION number scheme proposal, Duncan Cross
- Re: module _VERSION number scheme proposal, Michael Richter