lua-users home
lua-l archive

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


On Apr 26, 2014, at 6:44 AM, David Demelier <demelier.david@gmail.com> wrote:

> 2014-04-25 14:57 GMT+02:00 steve donovan <steve.j.donovan@gmail.com>:
>> On Fri, Apr 25, 2014 at 2:54 PM, Coroutines <coroutines@gmail.com> wrote:
>>> How is <> used in Pascal?
>> 
>> It is "not equal".
>> 
>>> Also, I would like to see ~= changed to !=.
>> 
>> Apparently ~ is a bitch to type on some keyboards, so allowing it as
>> an alternative might be an idea (Moonscript does this [1])
>> 
> 
> I also would like to have != instead of ~=. For many reasons, first
> because ~= usually mean "approximatively" and because almost all
> popular languages use !=. A beginner programmer will confuse when he
> will first see ~=. I don't think there are real reasons to keep this
> operator :-).

For Lunia (my custom build of Lua for my game engine) this was literally the first patch I created! ;)

I thought using ~= was a strange choice for not equals, as the tilde, to me, also makes me think "approximate", not "not equal".

What was the rational behind using ~= instead of != for Lua?

~pmd~