Re: Whitespace and snow blindness
| From: | Kristian Koehntopp | Date: | Thu, 16 May 2002 18:18:18 +0000 |
| Subject: | Re: Whitespace and snow blindness | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-6164@lists.php.net to get a copy of this message | ||
On Thu, May 16, 2002 at 04:34:05PM +0200, Sebastian Bergmann wrote:
> Kristian Koehntopp wrote:
> > Sebastian, will you please visit less Java lectures and university?
> Sure, if you give me my Diploma and save me the hassle.
You have much to learn, my very young padawan (and I just
returned from the attack of the clowns). ;)
> > My single line of code:
> > - $r = sprintf("Stackdump (level: %s) follows:\n", $this->_level);
> >
> > Your reformatting, covering half the gobi desert:
> > + $r = sprintf(
> > + "Stackdump (level: %s) follows:\n",
> > + $this->_level
> > + );
>
> I see your point, but it is only valid for lines shorter than 70+
> characters. I think you'll agree that overlong lines are bad.
>
> Why do I apply the same style used to shorten those long lines to
> not so long lines? Consistency.
Yep. I also agree that the right whitespace amount of whitespace
inproves readability.
But, and this is something that is just true of indentation,
consistency is not a goal in itself. The goal of indentation is
to promote readability of the code. Consistency often helps, but
it is just a tool. When the tool is not useful, just drop it -
readability is more important than consistency.
Furthermore, all of this is debug code. It should just get out
of the way as much as possible, because all of this code is
exactly NOT the point of the functions that contain it.
Kristian
--
http://www.amazon.de/exec/obidos/wishlist/18E5SVQ5HJZXG