logo

New Response

« Return to the blog entry

You are replying to:

    • avatar
    • Tim Tripcony
    • Posted on Tue 24 Apr 2012 08:58 AM

    Doh, he outed me. Which amuses me, because I was about to leave essentially the same comment. If you're able to properly catch and handle all errors within each method, chaining is fine, but in general it does make debugging far more difficult. So, yes, when there's not much complexity enclosed, I suppose it's "safe", but what happens when the process evolves and suddenly one of those methods must become more complex? Do you then rewrite everything that calls it to remove the chaining and add null checks? We've found it saves more time in the long run to structure our code that way to begin with than we were previously saving by chaining methods, but, as Stephan would say, YMMV.

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment: