Jason, he read it, he doesn't agree with it (see posts #4 and #6)
Btw: how come you just stumbled on it yesterday, I've posted the link when you asked us to post our unit test links a while back![]()
| SitePoint Sponsor |


Jason, he read it, he doesn't agree with it (see posts #4 and #6)
Btw: how come you just stumbled on it yesterday, I've posted the link when you asked us to post our unit test links a while back![]()
Per
Everything works on a PowerPoint slide
Let's say re-stumbledOriginally Posted by been
. I remembered reading it before but it had not stuck. It was brought up again yesterday as one of the articles in Joel Spolsky's new anthology.
My neurons connected the dots to this thread and I posted it here. Guess I should have re-scanned the thread first![]()




I know I'm late in this discussion, but let me add a couple of points.
First, object-oriented code tends to be inherently more type safe than procedural because if you use the wrong type you will typically make a wrong call early and it will blow up.
Second, type declarations create dependencies. Every time you mention an explicit class name, you are making it a little harder to decouple the class you're writing from the class you're mentioning. This is especially nasty in PHP due to the lack of namespaces. A name conflict involving a very large number of occurrences of a class name is hard to fix. I'm tempted to say it's advisable to avoid type hinting unless you have a naming scheme for your classes that guarantees globally unique class names.
Dagfinn Reiersøl
PHP in Action / Blog / Twitter
"Making the impossible possible, the possible easy,
and the easy elegant" -- Moshe Feldenkrais
Bookmarks