From: Chuck Ebbert <76306.1226@compuserve.com>
To: Dave Jones <davej@redhat.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: dual line backtraces for i386.
Date: Fri, 6 Jan 2006 13:36:45 -0500 [thread overview]
Message-ID: <200601061338_MC3-1-B567-4FDD@compuserve.com> (raw)
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
next reply other threads:[~2006-01-06 18:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-06 18:36 Chuck Ebbert [this message]
2006-01-06 19:17 ` Jan Engelhardt
2006-01-06 19:33 ` Bob Copeland
2006-01-07 0:00 ` Mitchell Blank Jr
2006-01-07 11:16 ` Jan Engelhardt
-- strict thread matches above, loose matches on Subject: below --
2006-01-05 18:18 Chuck Ebbert
2006-01-05 21:28 ` Dave Jones
2006-01-05 6:22 Dave Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200601061338_MC3-1-B567-4FDD@compuserve.com \
--to=76306.1226@compuserve.com \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®