Reply to Re: when will php support alias name?

Your name:

Reply:


Posted by Willem Bogaerts on 07/25/07 07:20

> When will php support:
>
> class My_Best_Class
> {
> }
> define('MyClass', 'My_Best_Class');
> $o = new MyClass; // use MyClass as aliasname of My_Best_Class?

Never, I hope. If you cannot even trust your identifiers, all hope of
maintaining code is gone forever.

Especially the example is stunning. This has nothing to do with object
orientation. If you do this the object-oriented way, you can use
factories, interfaces and subclasses.
Off course, a factory is a method (or a function), so you can SEE that
it is defined elsewhere. And you can even pass it parameters.

Best regards,
--
Willem Bogaerts

Application smith
Kratz B.V.
http://www.kratz.nl/

[Back to original 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

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