News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Jacob Santos's Blog:
Don't Advocate Inner Classes
August 11, 2006 @ 07:38:43

Jacob Santos talks in this new blog post about something that, if added to PHP, just might be more trouble than it's worth - inner classes.

Inner Classes are contained in parent classes and offer a sort of namespace mechanism for the public and open private class data transfer for private subclasses.

The functionality is already available in other languages, but the question is whether it is needed in PHP. The short answer is no. With PHP execution model, it would further slow down and bloat PHP compilation.

He demonstrates their purpose with some simple examples but also gives the reasons why it would be a bad thing to try to include them, including the better choice of namespaces over inner classes.

0 comments voice your opinion now!
inner classes advocate purpose namespaces choice inner classes advocate purpose namespaces choice


blog comments powered by Disqus

Similar Posts

Jani Hartikainen's Blog: How to use built-in SPL exception classes for better error handling

Klaus Graefensteiner's Blog: Choosing the right PHP version and flavor for Windows and IIS

NETTUTS.com: ASP.NET for PHP Developers: Part 2

Christian Stocker\'s Blog: PHP is (most presumably) getting namespaces

Enterprise PHP Magazine: Why Groupe Girard choosed PHP to J2EE to develop their ERP


Community Events





Don't see your event here?
Let us know!


framework library series developer laravel conference language interview bugfix tips podcast zendserver introduction deployment release voicesoftheelephpant api community list symfony

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework