octave-maintainers
[Top][All Lists]
Advanced

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

Re: GNU Octave Code Style: Prefer ~= or !=?


From: Andrew Janke
Subject: Re: GNU Octave Code Style: Prefer ~= or !=?
Date: Mon, 20 Jan 2020 23:56:46 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.9.1


On 1/20/20 11:52 PM, Kai Torben Ohlhus wrote:
> 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
> 

You're welcome!

I checked with mtmiller on IRC and he also says "!=".

I've sent in a PR to TextMate to update their Octave grammar to reflect
this. https://github.com/textmate/matlab.tmbundle/pull/10

Cheers,
Andrew



reply via email to

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