Reply to Re: Object of class Person could not be converted to string

Your name:

Reply:


Posted by gosha bine on 06/12/07 08:22

On 11.06.2007 20:58 Schraalhans Keukenmeester wrote:
>
> Imho implicit obj2str conversion is meaningless, and though I have abused
> the construct myself a few times I am glad they corrected this behaviour.
> Having to define your own stringifier forces you to think about and
> implement what is logically the proper meaning of a conversion to an
> otherwise incompatible type.

That's exactly the point Zend developers are constantly missing. It is
not the responsibility of language designers to remove constructs that
may seem "useless" to them. An application programmer is the one who
decides which syntax is appropriate for her particular task. The job of
the language designer is to provide clean and consistent mechanism for
generating any possible expression, including "useless" ones. You don't
let a taxi driver decide where you're going to go, do you?

As to this specific case, removal of implicit toString is especially
stupid, because _every other_ type in php and _every other_ comparable
programming language supports it.



--
gosha bine

extended php parser ~ http://code.google.com/p/pihipi
blok ~ http://www.tagarga.com/blok

[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

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