[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNU Octave Code Style: Prefer ~= or !=?
From: |
Kai Torben Ohlhus |
Subject: |
Re: GNU Octave Code Style: Prefer ~= or !=? |
Date: |
Tue, 21 Jan 2020 13:52:15 +0900 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0 |
On 1/21/20 12:25 PM, Andrew Janke wrote:
> Hi y'all,
>
> Can I get a ruling on a Code Style issue for
> https://wiki.octave.org/Octave_style_guide?
>
> Do you prefer ~= or != for "not equal" comparisons?
>
> The code style says "!" is preferred over "~" but it doesn't explicitly
> talk about "!=" vs "~=".
>
> Cheers,
> Andrew
>
Thanks for expanding the wiki about this. Statistically I would say
Octave prefers "!=":
$ find . -iname "*.m" -exec grep "~=" {} \; | wc -l
16
$ find . -iname "*.m" -exec grep "!=" {} \; | wc -l
910
Best,
Kai