|
Posted by Chung Leong on 12/21/05 05:06
Oli Filth wrote:
> Engineering isn't just about finding the first thing that works, it's
> about finding the best solution given particular constraints, and
> hopefully thinking about aspects such as long-term maintenance as well.
>
> Normally, it might be true that aesthetics and principles are secondary,
> but in the case of a computer language, these two qualities are often
> intrinsically related to the semantics, structure and useability, and so
> can't be ignored. Ignoring them is what led to PHP 4.
"Secondary" hardly means "it should be ignored." To spell out the
obvious, secondary means "not primary" and objectives that are
secondary do not take precedent over those that are primary. The
primary objective of PHP is to run PHP code. If a new version of PHP
cannot run a piece of existing code, then it fails. In engineering, of
course, failures aren't always avoidable and might be acceptable
provided that they're small or happen rarely. To argue though, that if
we fail once we should fail some more, is simply crazy.
By most measures PHP 4 has been a great engineering success so I don't
know what you're hinting at.
> I think the developers have realised, however, that there are millions
> of programmers out there who are used to OO features (for example) in
> more "structured" languages, but laughed at PHP 4's attempt at OO, and
> still laugh at the mish-mash nonsense of inconsistency that litters PHP
> 5. To attract these hardened programmers who are used to the formalities
> of, for instance, Java, and view PHP as a toy not to be used for any
> serious purpose, the developers know that from now on, the future of PHP
> needs to be *planned* rather than *hacked*, and some of the embarrassing
> legacy swept under the carpet.
Well, implementing something because critics are laughing at you is not
exactly good engineering now is it? Embarassment is hardly a technical
parameter either. Vanity is a trait of many an academics, so I think
you're proving my point.
> Unfortuantely (well, maybe not, depending on your opinion), that may be
> at the expense of the "PHP is great for hacking together any old
> unprogrammatic atrocity" ethos. But then again, that ethos is the
> self-fulfilling prophecy that fosters the liberal use of eval(),
> numbered variables rather than arrays, dynamic class definitions, code
> replication and nested-ifs instead of polymorphism, etc., etc...
Bad coding won't get you any closer to a working program so I don't see
the logic in this prophecy of your. What I do know is this: a working
program is better than a non-working one with polymorphism.
> To properly design a language, it necessarily involves a large amount of
> "academic" input - in the sense that it involves sitting down for a
> *long* time and working out the whole plan in fine detail.
Computer languages are called languages for a reason. Fundamentally,
that's how they're used: a programmer is communicating his desires to
the computer. A good language allows its user to efficiently express
the widest range of ideas. As no one can anticipate what others will be
thinking, a language developed unguided by usage will inevitably be
overly introspective that cramps people's thought. It's no accident
that PHP is as successful as it is. The ad hoc manner by which it
developed is the source of its strength, not its weakness.
That was the linguist in me speaking :-)
[Back to original message]
|