[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: ~= vs. !=
- From: "Nick Trout" <nick@...>
- Date: Wed, 26 Nov 2003 16:33:58 -0800
> Mark Hamburg:
> I'm not advocating a change -- though I do have to pause to think
about
> what
> the inequality operator is in Lua when I need it -- but if I were
picking
> a
> replacement, I'd probably go with "<>" rather than "!=" since "!="
only
> makes sense if you also introduce "!" where as "<>" fits with the
other
> inequality operators.
This just goes to show how there are different opinions about style,
consistency and implementation.
> Virgil Smith:
> Furthermore, I'm befuddled by the statement that != is a *special*
case.
[...]
> So, does anyone have references for their assertions of the frequency
of
> !=
Dylan uses ~= as well. != seems to be the highest median use but ~= is
not the only variant.
http://merd.net/pixel/language-study/syntax-across-languages.html
FWIW Python just had *massive* discussion about tertiary operators (i.e.
C: t ? a : b) and came to NO conclusion, i.e. there was no consensus so
it was not added.
N