On Wed, Oct 30, 2002 at 01:09:51PM +0000, Tim Sweetman wrote:
> David Cantrell wrote:
> > On Wed, Oct 30, 2002 at 10:26:41AM +0000, Andy Wardley wrote:
> > > PHP is, or should be, a quick hack language.  The fundamental feature
> > > of embedding application code directly in presentation markup is the
> > > biggest no-no there is.  It leads to a poor (or non-existant) separation
> > > of concerns, typified by spaghetti code programs that are all but impossible
> > > to read, understand, extend and maintain.
> > Unreadable spaghetti is a function of the programmer, not (generally) of
> > the language.
> <reductio ad="absurdum">
> ... so we might as well all program in COBOL.
> </reductio>

There are, of course, other reasons for rejecting languages.  Some of which
apply to PHP.  Some of which apply to perl, TT, COBOL and any other flavour
of the week.

Remember, all software sucks*.  But to say that "embedding application code
in markup leads to a poor (or non-existant) seperation of concerned,
typified by spaghetti code" is to talk bollocks.  Yes, there are *some*
languages which might be said to encourage spaghetti.  Assemblers do, as do
many dialects of BASIC.  But I see nothing inherent in embedding code in
markup that would encourage it**.  Therefore, when you *do* come across such
'orribleness, and especially if it's in a language where spaghetti can be
easily avoided then the programmer is most definitely to blame.

* - and absolutism in software sucks absolutely?
** - depending on the lnaguage, of course.  Embedded perl is fine, embedded
Sparc assembler would suck.

> >                              And I maintain that *any* templating
> > language is code embedded in presentation.
> We can chop carrots finely with a food processor. Or we can duck out of
> the way and throw 15,000 knives across the room at high speed.

I fail to see the point of this analogy.  If you disagree with me, say
so, and tell us why you think I'm talking arse.

-- 
David Cantrell | Member of the Brute Squad | http://www.cantrell.org.uk/david

One person can change the world, but most of the time they shouldn't
    -- Marge Simpson

Reply via email to