SitePoint Sponsor

User Tag List

Page 3 of 3 FirstFirst 123
Results 51 to 53 of 53
  1. #51
    SitePoint Addict been's Avatar
    Join Date
    May 2002
    Location
    Gent, Belgium
    Posts
    284
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

  2. #52
    eschew sesquipedalians silver trophy sweatje's Avatar
    Join Date
    Jun 2003
    Location
    Iowa, USA
    Posts
    3,749
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by been
    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
    Let's say re-stumbled . 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

  3. #53
    SitePoint Guru dagfinn's Avatar
    Join Date
    Jan 2004
    Location
    Oslo, Norway
    Posts
    894
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •