[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Alternative to ~= for inequality?
- From: Ross Bencina <rossb-lists@...>
- Date: Sat, 09 Feb 2013 03:04:52 +1100
On 9/02/2013 12:50 AM, Joseph Manning wrote:
Appeal to Lua developers: is there any chance of at least adding != as
>>an alternative in the next release?
Nooooooo! Please don't Perl-ise it.
"Perl-ise" o.O You gotta be kidding. That's the only language you know
with != ?
For some light relief I thought I'd go through the TIOBE top 20 looking
at inequality operators (info sourced from [2][3] where not otherwise
indicated ):
!=
C, Java, Objective-C, C++, C#, PHP [4], Python [5], Perl [6], JavaScript
[7], Ruby, Bash
<>
Visual Basic, VB.NET [8], Pascal, Delphi/Object Pascal[10], Python
(deep) [5]
~=
Smalltalk, MATLAB, Lua
/=
Lisp [9], Ada
Alex wrote:
> Programming language design is not fashion.
Notation is not about obscuritansim either.
Cheers,
Ross.
[1] http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
[2] http://en.wikipedia.org/wiki/Relational_operator
[3] http://rigaux.org/language-study/syntax-across-languages-per-language/
[4] PHP also has !==
http://rigaux.org/language-study/syntax-across-languages-per-language/PHP.html#2
[5] Python also has <> for deep inequality
http://rigaux.org/language-study/syntax-across-languages-per-language/Python.html
[6] Perl 6 also has !==
http://rigaux.org/language-study/syntax-across-languages-per-language/Perl6.html
[7] === and !== differ from == and != when the objects' type differ
http://rigaux.org/language-study/syntax-across-languages-per-language/JavaScript.html#1
[8] http://msdn.microsoft.com/en-us/library/aa711633(v=vs.71).aspx
[9]
http://www.gnu.org/software/emacs/manual/html_node/elisp/Comparison-of-Numbers.html
[10] http://library.thinkquest.org/C006657/delphi/operators_in_delphi.htm