bug-zile
[Top][All Lists]
Advanced

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

Re: [Bug-zile] No need to reverse comparisons in Lua


From: Gary V. Vaughan
Subject: Re: [Bug-zile] No need to reverse comparisons in Lua
Date: Sat, 28 Jan 2012 09:58:27 +0700

Hi Reuben,

On 28 ม.ค. 2012, at 6:16, Reuben Thomas <address@hidden> wrote:
> Writing e.g.  0 == a  doesn't help in Lua, since assignments aren't
> legal expressions. Hence avoid it, for the sake of those who, like me,
> do a double-take whenever they see a "reversed" comparison.

True enough.  I think it is a sort of nervous tick I've picked up, which
has saved me in so many other languages that I now write code in
that order without conscious thought.  I'll fix the existing cases in
a few days, and try not to commit any new ones.

Another 'tick' I have from my days of writing elisp is that I almost
always write increments and decrements as '1+ x' and '1- y' (and
invariably have to go back and fix the decrement expressions)!

Cheers,
-- 
Gary V. Vaughan (Gary AT gnu DOT org)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]