Re: PHP global namespace clogged up

From: Chris Hope (blackhole_at_electrictoolbox.com)
Date: 09/03/04


Date: Fri, 03 Sep 2004 19:35:05 +1200

Tim Tyler wrote:

> Chris Hope <blackhole@electrictoolbox.com> wrote or quoted:
>> Tim Tyler wrote:
>
>> The main problem with trying to fix PHP in respect to the issues you have
>> pointed out in your many posts, is that they need to maintain backward
>> compatibility. OK, so maybe they don't, but it makes it very hard to move
>> developers/hosting providers/etc onto a Brand New Version of PHP which
>> isn't backward compatible, even though it might address all the issues
>> brought about because of the way PHP has evolved. It'll take long enough
>> for everyone to move to v5, let alone to a new version which throws all
>> the existing function names and syntax out the window, and breaks all
>> existing legacy systems.
>
> My proposal (in the first post of this thread) described what would be
> needed to clean things up without breaking legacy systems:
>
> ``To clean up the existing mess, many new functions need to
> be created as member function of the appropriate objects -
> and most of the old functions in the global namespace need
> deprecating.''
>
> Deprecating functions doesn't break anything - since all the old
> functions are still there and they still work just as before - the
> only difference is that they generate deprecation warnings if you
> set a flag when parsing the page.
>
> This doesn't clean things up immediately - but it does allow a
> clean-up to be performed in the future.
>
> IMO, if a clean-up is attemped it is most likely to initially take
> the form of third party libraries - intended for "real progammers",
> who are not happy with the existing situation - and want a decent
> set of library routines for PHP.

That would work quite nicely. It's pretty much what they've done with the
rework of OOP in v5, as most of the new stuff should still work in v4,
although I haven't looked too much into it yet. Waiting for another few
minor releases first before I think about starting to use it...

-- 
Chris Hope - The Electric Toolbox - http://www.electrictoolbox.com/


Relevant Pages

  • Re: Is VB.NET Popular???
    ... and I only started swearing after the MS Dictator 2.0 started blocking ... my posts. ... Go learn PHP if you want no one here cares ... Robin S. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Need recommendation for web development software
    ... Can you give examples of good websites? ... search & replace across multiple files, intenting & color highlighting for PHP coding... ... Keep everything clean and properly indented & you will be fine. ... I'd recommend something like php based 'gallery' which generates dynamic pages on the server so it's easier to integrate changes when you make improvements or changes to the site. ...
    (alt.photography)
  • Re: Need recommendation for web development software
    ... software would you recommend for creating websites with lots of pictures? ... Can you give examples of good websites? ... I use PsPad as an editor, it's shareware & has a few features for global search & replace across multiple files, intenting & color highlighting for PHP coding... ... Keep everything clean and properly indented & you will be fine. ...
    (alt.photography)
  • Re: Need recommendation for web development software
    ... software would you recommend for creating websites with lots of pictures? ... Can you give examples of good websites? ... search & replace across multiple files, intenting & color highlighting for PHP coding... ... Keep everything clean and properly indented & you will be fine. ...
    (alt.photography)
  • Re: If() action within print()..?
    ... I'v spent 6 years working with PHP and I still don't know it all (and ... it is _the_ best resource (just trust me on this ... You'll see from my previous posts.. ...
    (comp.lang.php)