lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Last time I checked, the "~" character was the standard logical symbol
for "not." At least it was in my statistics class (e.g. "A|~B"). So
really the tilde character makes more sense to me (though I admit my
knowledge about this topic is somewhat limited).

Does anyone have a good reason why "!=" should be used that does not
reference other languages? I think this is an important point since Lua
was designed to allow non-programmers and artists to write scripts,
these people probably haven't been exposed to the "!=" format. Whereas
with the "~=" operator, at least this would be familiar to people who
took logic courses.

I've never heard of '~' being 'Not'. Maybe because I never studied statistics..

To me, saying you 'can't reference other languages' is a bit silly. As other people have mentioned, it's a trivial change to the interpreter, and an easy search/replace change in Lua source (assuming you also get rid of the ~= operator), and it DOES match LOTS of other languages.

BTW, I'd also be happy with <>, but ~= is just 'unique', and has different meanings in other languages ('matches' in perl, and ~ means 'ones complement' in C, and possibly other languages).

Lots of people have been exposed to '!=' who you might not traditionally call 'programmers' - people who've fiddled with Perl, or Javascript or PHP etc.

Being 'different' for no reason other than 'it's a different language and that's what it is' is just an unnecessary stumbling block towards ease of use.

(I have less issues with --, personally, I'd like to be able to use either //, # or --)

Also, I don't see any problems with having both ~= and !=, as long as it doesn't add more than a line or two to the source code.

Paul				VPOP3 - Internet Email Server/Gateway