lua-users home
lua-l archive

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


On Thu, 27 Nov 2003 around 13:23, you wrote:
> 
> RI> Even today a lot of languages do not use `!=': Ada, Haskell, Eiffel, and
> RI> Fortran90 use `/='; Icon, Dylan, Smalltalk (and Lua) use `~='; several
> RI> Pascal-based languages use `<>'; Oberon, Modula2, and Modula3 use `#'.
> 
> not to mention perl and php, which both have 2 different comparison
> operator sets, one for special cases: gt, lt, eq, ne for strings in
> perl, ===, !== for an actual comparison with false (as opposed to just
> a value that is considered to be false) in php. This is a lot weirder
> and has bitten me a lot more often than using a single operator, that
> might look strange at first, but does what you expect it to do.
> 

And Icon has ... wait for it:

	Numerical comparison: >  >=  =  <=  <  ~=
	Lexical comparison: >>  >>=  ==  <<=  <<  ~==
	Value comparison: ===  ~===

Hard to learn, but actually very, very useful.

Robby

PS: Icon info at http://www.cs.arizona.edu/icon/ , googling for it is hard.

--
Any fool can write code that a computer can understand.
Good programmers write code that humans can understand.
	Martin Fowler