Hello Jason,

Monday, February 16, 2004, 2:21:01 PM, you wrote:

>> Consistency.
JW> With what? With whose idea of style/formatting?

If you hadn't chopped off the rest of my paragraph you'd have the
answer.

JW> I doubt you will find consistency in the real between different 
JW> programmers/organisations. If such consistency was there then PHP would've
JW> have only had to support a single formatting style/syntax.

You won't, but you will find standards that some people adhere to. Feel
free to do whatever you like, I don't have to debug your code so it
doesn't bother me :)

JW> To me the alternative of escaping in and out of php over 3 or more lines is
JW> even more of a mess.

How is clearly structured code a mess? The line count is irrelevant.
Your preferred version is a scramble of tags and code, mine is clearly
defined per line, works in my IDE of choice (as well as others with
brace matching) and follows the attempts out there of PHP coding standards
(mostly inherited from the C++ fraternity). That's why *I* like it.

We're not going to agree on this, but you're still wrong in saying the
version I posted is "messy"; it couldn't get any cleaner even in an
html escaping context. Each to their own.

JW> It should be judged by its substance (ie the other factors) and not style. All

That's like saying a piece of art should not be judged in its use of
colour, but on the image itself - when in actual fact, they're both
as important as each other.

Children (and indeed adults) pick up bad writing habits by reading
"sloppy" prose, you implicitly learn the style in-front of you even if
the message itself comes across loud and clear. I see no difference
with code. You're saying "if it works, what does it matter what it
looks like". I don't agree, it matters a lot.

JW> Good coding techniques/practices/styles have their own books.

Everything has its own book, that doesn't mean it shouldn't be
encouraged/implied in the more "beginner" titles out there. It's their
responsibility as well. They should teach how to avoid spaghetti
coding and how to structure code so you can return to it a few years
down the line and not think "wtf is going on here?".

JW> Just as you can't judge a book by its cover, you should not judge a
JW> programming language book by its coding style.

We can leave this here because this will continue going around in
circles - but I strongly disagree. You can tell a LOT about the
overall quality of a script by its coding style and structure - just
because its printed in the pages of book I see no reason why they
should be treated any differently.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to