On May 30, 2013, at 3:52 AM, Ian Joyner <ianjoy...@me.com> wrote: > What I am trying to point out though is that there is a misapprehension that > premature optimization means writing structured code early on so don't > structure it because you can always go and clean it up later. Rather I think > we should write well-structured code as we go.
I agree 100% with that. Structured code is easier to benchmark and optimize later on, anyway — as I said, if you repeat a piece of code ten times, none of the ten instances may show up individually as hot spots, whereas if you called a common function/method in ten places, it may show up and then be easy to fix. I would add, though, that the perfect structure (class hierarchy, API, factoring…) may not be apparent right away, especially since you’ll often end up refactoring as you go along. So trying too hard to structure code as you’re initially writing it can end up being a rathole. —Jens _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com