lkml.org 
[lkml]   [2006]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: dual line backtraces for i386.
In-Reply-To: <20060105212802.GR20809@redhat.com>

On Thu, 5 Jan 2006 at 16:28:02 -0500, Dave Jones wrote:

> > Why not:
> >
> > printk(space == 0 ? " " : "\n");
> > space = !space;
>
> readability ?

Well, if I were going for _un_readability I'd have suggested:

printk(space = !space ? " " : "\n");

:)

> Personally, I despise the ternary operator, because it makes me
> stop to try to parse it every time I see it.

I think it's a psychological thing because it makes you spend as
much time parsing a single line as it would to parse a whole
if-then-else and it just feels wrong somehow.

> With the code I wrote
> it's blindlingly obvious what is going on.

For simple espressions I think it's about the same, but like you said
it's a personal thing. A soon as you start nesting cases the 'if'
becomes much clearer. (People who nest ternary expressions should
be taken out and shot.)
--
Chuck
Currently reading: _Thud!_ by Terry Pratchett
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-01-06 19:43    [W:0.049 / U:5.232 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site