You are here: Re: [PHP] General question: packaging in PHP « PHP « IT news, forums, messages
Re: [PHP] General question: packaging in PHP

Posted by Terje Slettebψ on 01/30/05 14:49

>From: "Vivian Steller" <vivian.steller@informatik.uni-ulm.de>

> i've a general question concerning PHP's architecture.
>
> Why isn't there a native packaging concept in PHP?

This was also suggested on comp.lang.php, recently (the "nested class"
thread), called "namespaces", but there wasn't a lot of enthusiasm for it.
Apparently, it was even implemented at one point, but then subsequently
dropped. I've found it difficult to find the relevant discussion in the
archive (possible the internals-list or Zend's engin2-list), could anyone
provide a link?

> I think php became much more powerfull with the extended OOP features
> introduced in PHP5 - without a packaging concept you couldn't use these
> features "in big business" (in terms of sharing classes/libraries). I know
> the discussion of OOP features vs. PHPs scripting capabilities, but IMHO
> doing the half way of OOP isn't right...

I guess package/namespace doesn't have a lot to do with OO (except that they
both allow grouping of functionality, and avoiding name collision, but
that's not the only benefit of OO), but as there hasn't been any enthusiasm
for overloading, either (not even for user-defined types, where you _can_
use "type hints" in function signatures), and it's common in OO languages, I
guess you have a point. Interestingly, I found that Perl has the possibility
of function overloading (also a language that's dynamically typed)
(http://www.math.tu-berlin.de/polymake/perl/overload.html) It also has -
like Python - operator overloading. But is there any enthusiasm for that in
the PHP community, either? Nah...

> Are there any thoughts about that in future releases?
> What do other developers think about this issue?
> How do organize multiple used classnames?

The common answer is: "Use a prefix"...

Regards,

Terje

 

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

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация