[Top][All Lists]

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

Re: Bugfix for issue 1630 (issue4490045)

From: karin . hoethker
Subject: Re: Bugfix for issue 1630 (issue4490045)
Date: Sun, 29 May 2011 12:46:48 +0000

On 2011/05/29 12:14:18, Carl wrote:
On 2011/05/29 08:53:30, benko.pal wrote:
> I must miss something, to me it's still a boolean.
> and (still to me) it's not an inline conditional, but
> an assignment of a boolean expression to a boolean
> variable.

I just used inline conditionals as an example of a code style where
conditions are inlined. More generally, there seem to be two views on

One could be summarized as "Don't do more than one thing in one line"
(for example inline conditions that might come as evaluation of a
boolean expression within an assignment, or inline conditionals). The
code is easier to "parse" for a new reader and easier to debug. This
view seems to be popular in the Java world.

The other take is "Compact code is more readable" as in the proposed
change. If an experienced reader recognizes patterns such as "Boolean
evaluation inside an argument" the code may be faster to read (unless
the code is too compact).

If it helps to close the issue I'll change the code. I suppose that the
general question will be settled in the upcoming style discussion.

reply via email to

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