Le 19/07/2018 à 10:49, U.Mutlu a écrit :
Hi,
it makes me 'crazy' when I see such if-else constructs:
if (x)
return 7;
else
return 4;
(Of course in this case one better would use the shorthand "return x ?
7 : 4;", but that's not the issue here)
The 'else' is obviously superfluous/r
On 19/07/2018 18:56, Eric Gallager wrote:
On 7/19/18, U.Mutlu wrote:
Hi,
it makes me 'crazy' when I see such if-else constructs:
if (x)
return 7;
else
return 4;
(Of course in this case one better would use the shorthand "return x ? 7 :
4;", but that's not the issue here)
On 7/19/18, U.Mutlu wrote:
> Hi,
> it makes me 'crazy' when I see such if-else constructs:
>if (x)
> return 7;
>else
> return 4;
>
> (Of course in this case one better would use the shorthand "return x ? 7 :
> 4;", but that's not the issue here)
>
> The 'else' is obviously superf
On Thu, 19 Jul 2018 at 14:01, Paul Koning wrote:
> Warnings are appropriate for code that is known to be a source of bugs, or
> where there is a reasonable chance that the intent of the programmer doesn't
> match what was actually written. That's not the case here.
Agreed. This seems to be a pu
> On Jul 19, 2018, at 4:49 AM, U.Mutlu wrote:
>
> Hi,
> it makes me 'crazy' when I see such if-else constructs:
> if (x)
>return 7;
> else
>return 4;
>
> (Of course in this case one better would use the shorthand "return x ? 7 :
> 4;", but that's not the issue here)
>
> The 'else'
Hi,
it makes me 'crazy' when I see such if-else constructs:
if (x)
return 7;
else
return 4;
(Of course in this case one better would use the shorthand "return x ? 7 :
4;", but that's not the issue here)
The 'else' is obviously superfluous/redundant, ie. unneeded at all:
if (x)