• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSMapTable with C strings as keys
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMapTable with C strings as keys


  • Subject: Re: NSMapTable with C strings as keys
  • From: Jens Alfke <email@hidden>
  • Date: Thu, 30 May 2013 08:43:24 -0700

On May 30, 2013, at 3:52 AM, Ian Joyner <email@hidden> 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 (email@hidden)

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:

This email sent to email@hidden


  • Follow-Ups:
    • Re: NSMapTable with C strings as keys
      • From: Ian Joyner <email@hidden>
References: 
 >NSMapTable with C strings as keys (From: Oleg Krupnov <email@hidden>)
 >Re: NSMapTable with C strings as keys (From: Graham Cox <email@hidden>)
 >Re: NSMapTable with C strings as keys (From: Oleg Krupnov <email@hidden>)
 >Re: NSMapTable with C strings as keys (From: Ian Joyner <email@hidden>)
 >Re: NSMapTable with C strings as keys (From: Jens Alfke <email@hidden>)
 >Re: NSMapTable with C strings as keys (From: Ian Joyner <email@hidden>)

  • Prev by Date: Re: Dismissing menu from menu item that uses custom view
  • Next by Date: Re: NSMapTable with C strings as keys
  • Previous by thread: Re: NSMapTable with C strings as keys
  • Next by thread: Re: NSMapTable with C strings as keys
  • Index(es):
    • Date
    • Thread