[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Alternative to ~= for inequality?
- From: Miles Bader <miles@...>
- Date: Mon, 11 Feb 2013 09:02:11 +0900
Steve Litt <slitt@troubleshooters.com> writes:
>> Adding a few very minor redundancies (like "!=") to fix historical
>> quirks in Lua isn't "perl-ising."
>
> "Historical quirks" is an interesting characterization. I cut my teeth
> on Pascal, so to me, "!=" is a "historical quirk". Maybe Lua should use
> "<>", which is *much* more obvious than "!=", which to me sounds more
> like "emphatically equal" than "not equal".
I will explain why I use that phrase:
I don't think _any_ of these syntaxes (!=, ~=, <>) is inherently
really much better or worse than the others [welll.... actually I've
never really liked "<>", even though I cut my programming teeth on
BASIC and Pascal!]
What I meant was that if Lua were designed _today_, I expect it would
go with "!=" simply because (1) meh, doesn't really matter, (2) all
the other popular languages these days use !=, and (3) when all else
is equal, there's real benefit from consistency with what people are
already familiar with.
-miles
--
Ich bin ein Virus. Mach' mit und kopiere mich in Deine .signature.