in reply to RE: Mysterious the ways: == and eq in thread Mysterious the ways: == and eq
Well said. Although the language is typeless, it is critical that logical query expressions be type-specific. For example, it might be critical to tell if a string is, exactly, "1.0" (eg. for a version number). Of course, you can use /^1\.0$/ (I think that's right :) ) but that's an inefficient approach. For efficiency's sake, 'eq' is needed, and 'gt' and 'lt' have quite different meanings to > and <.
In perl, "1.2" > "1a", but "1.2" lt "1a". If I remember correctly :)
|