You are here: Re: Breaking backwards compatibility - good or bad? « PHP Programming Language « IT news, forums, messages
Re: Breaking backwards compatibility - good or bad?

Posted by Oli Filth on 12/21/05 21:04

Chung Leong wrote:
> Oli Filth wrote:
>
>>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.

Hmm, "ignored" was a bit strong. I think "put to one side" or "added as
an after-thought" was what I meant. ;)

>
> By most measures PHP 4 has been a great engineering success so I don't
> know what you're hinting at.

I agree, it's a widespread success, but its also a big sprawling heap of
hacks, afterthoughts, inconsistent function names and parameter lists,
function aliases, issues with references that no-one really knows how to
deal with, version incompatibilities, nonsense like magic quotes, ...
That's what I was 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.

I wasn't referring to "critics" in the sense of academics, but to
real-world programmers who might have wanted to use PHP if it weren't
such a mess (compared to other languages).

The support and interest of professional software developers is crucial
for the continued advancement of PHP, IMO.


>>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.

Bad coding *can* get you closer to a working (in one sense of the word)
program - I've seen countless posts in PHP newsgroups where newbies have
asked things like "How can I loop through my variables $thing1,
$thing2...?", to which the answer is "use arrays instead", to which
their response is "well, my variables do the job, so why should I?". If
people don't take the time to learn good practice, they'll never see
*why* the things they were doing before were bad practice - that's what
I meant by self-fulfilling prophecy. If the language can help enforce
some aspects of good practice, then that's a good thing IMO.


> 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.
>

How about C or C++? They're immensely successful, far more widely used
than PHP, and comparatively they're set in stone - you don't get Bjarne
Stroustrup (chief mind behind C++) going "oh, I think we'll change the
semantics of pointers and references" every 5 minutes. Yes, these
languages get new features added from time to time, but because they
were planned so well in the first place, they very rarely lead to
backwards incompatibility.

The "ad hoc" manner in which PHP has been developed is indisuptably the
source of many of its weaknesses. It might also be the source of its
strengths, but possibly because many of those strengths are aspects
which should have been thought of in the first place.


--
Oli

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация