• Home
  • About

Saved searches

  • Remove
  • Verified account @
Suggested users
  • Verified account @
  • Verified account @
  • Language: English
    • Bahasa Indonesia
    • Bahasa Melayu
    • Català
    • Čeština
    • Dansk
    • Deutsch
    • English UK
    • Español
    • Filipino
    • Français
    • Hrvatski
    • Italiano
    • Magyar
    • Nederlands
    • Norsk
    • Polski
    • Português
    • Română
    • Slovenčina
    • Suomi
    • Svenska
    • Tiếng Việt
    • Türkçe
    • Ελληνικά
    • Български език
    • Русский
    • Српски
    • Українська мова
    • עִבְרִית
    • العربية
    • فارسی
    • मराठी
    • हिन्दी
    • বাংলা
    • ગુજરાતી
    • தமிழ்
    • ಕನ್ನಡ
    • ภาษาไทย
    • 한국어
    • 日本語
    • 简体中文
    • 繁體中文
  • Have an account? Log in
    Have an account?
    · Forgot password?

    New to Twitter?
    Sign up
By using Twitter’s services you agree to our Cookie Use and Data Transfer outside the EU. We and our partners operate globally and use cookies, including for analytics, personalisation, and ads.
gparker's profile
Greg Parker
Greg Parker
Greg Parker
@gparker

Greg Parker

@gparker

Swift and Objective-C Runtime Wrangler

Joined September 2008
  • © 2016 Twitter
  • About
  • Help
  • Terms
  • Privacy
  • Cookies
  • Ads info
Dismiss
Previous
Next

Go to a person's profile

Saved searches

  • Remove
  • Verified account @
Suggested users
  • Verified account @
  • Verified account @

Retweet this to your followers?

Optional comment for Retweet
 
 

Saved searches

  • Remove
  • Verified account @
Suggested users
  • Verified account @
  • Verified account @
140

Are you sure you want to delete this Tweet?

Promote this Tweet

Block

  • Add a location to your Tweets

    When you tweet with a location, Twitter stores that location. You can switch location on/off before each Tweet and always have the option to delete your location history. Learn more

    Profile summary

    Your lists

    Create a new list


    Under 100 characters, optional

    Privacy

    Copy link to Tweet

    Embed this Tweet

    Embed this Video

    Add this Tweet to your website by copying the code below. Learn more

    Add this video to your website by copying the code below. Learn more

    Hmm, there was a problem reaching the server.

    Preview

    Log in to Twitter

    · Forgot password?
    Don't have an account? Sign up »

    Sign up for Twitter

    Not on Twitter? Sign up, tune into the things you care about, and get updates as they happen.

    Sign up
    Have an account? Log in »

    Two-way (sending and receiving) short codes:

    Country Code For customers of
    United States 40404 (any)
    Canada 21212 (any)
    United Kingdom 86444 Vodafone, Orange, 3, O2
    Brazil 40404 Nextel, TIM
    Haiti 40404 Digicel, Voila
    Ireland 51210 Vodafone, O2
    India 53000 Bharti Airtel, Videocon, Reliance
    Indonesia 89887 AXIS, 3, Telkomsel, Indosat, XL Axiata
    Italy 4880804 Wind
    3424486444 Vodafone
    » See SMS short codes for other countries

    Confirmation

     

    Buy Now

    Hmm... Something went wrong. Please try again.

    Welcome home!

    This timeline is where you’ll spend most of your time, getting instant updates about what matters to you.

    Tweets not working for you?

    Hover over the profile pic and click the Following button to unfollow any account.

    Say a lot with a little

    When you see a Tweet you love, tap the heart — it lets the person who wrote it know you shared the love.

    Spread the word

    The fastest way to share someone else’s Tweet with your followers is with a Retweet. Tap the icon to send it instantly.

    Join the conversation

    Add your thoughts about any Tweet with a Reply. Find a topic you’re passionate about, and jump right in.

    Learn the latest

    Get instant insight into what people are talking about now.

    Get more of what you love

    Follow more accounts to get instant updates about topics you care about.

    Find what's happening

    See the latest conversations about any topic instantly.

    Never miss a Moment

    Catch up instantly on the best stories happening as they unfold.

    Previous Tweet Next Tweet
    Greg Parker ‏@gparker 13 Jan 2014

    Don't use associated objects with value-like types. Changes in instance de-duplication will ruin your day.

    • Retweets 13
    • Likes 17
    • TJ Usiyan Hu Junfeng Jason 東 Michael Tsai Eric Broska Ben Cochran Justin Spahr-Summers Wayn.W.Zhang
    12:06 PM - 13 Jan 2014
    0 replies 13 retweets 17 likes
      1. rentzsch ‏@rentzsch 13 Jan 2014

        @gparker I don't know what this means, but I'm scared now

        0 replies 0 retweets 7 likes
      2. View other replies
      3. Daniel Jalkut ‏@danielpunkass 13 Jan 2014

        @rentzsch @gparker Expect immutable types to behave like immutable types …

        0 replies 0 retweets 0 likes
      4. Steve Weller ‏@Bagelturf 13 Jan 2014

        @danielpunkass @rentzsch @gparker The question boils down to what is "value-like" and who defines that interpretation? UIImage? NSData?

        0 replies 0 retweets 0 likes
      5. View other replies
      6. Ben Lings ‏@ben_lings 13 Jan 2014

        @Bagelturf @danielpunkass @rentzsch @gparker anything you'd call -isEqual: on

        0 replies 0 retweets 0 likes
      7. Daniel Jalkut ‏@danielpunkass 13 Jan 2014

        @ben_lings @Bagelturf @rentzsch @gparker Is that meant to be a joke?

        0 replies 0 retweets 0 likes
      8. View other replies
      9. Ben Lings ‏@ben_lings 13 Jan 2014

        @danielpunkass @Bagelturf @rentzsch @gparker for non-value objects, you'd probably just use pointer equality

        0 replies 0 retweets 0 likes
      10. View other replies
      11. Daniel Jalkut ‏@danielpunkass 13 Jan 2014

        @ben_lings @Bagelturf @rentzsch I suspect @gparker’s warning applies to a far smaller set of classes than anything you’d call isEqual: with.

        0 replies 0 retweets 0 likes
      12. Ben Lings ‏@ben_lings 13 Jan 2014

        @danielpunkass @Bagelturf @rentzsch @gparker yes definitely! In principle though, any immutable value could be uniqued (?)

        0 replies 0 retweets 0 likes
      13. Show more
      1. Nick Lockwood ‏@nicklockwood 13 Jan 2014 Westminster, England

        @gparker do you mean don't objc_setAssociatedObject(<value_type>, key, obj) or don't objc_setAssociatedObject(obj, key, <value_type>)?

        0 replies 0 retweets 0 likes
      2. View other replies
      3. Peter Steinberger ‏@steipete 13 Jan 2014

        @nicklockwood @gparker More like don’t use associated objects for NSString or UIColor.

        0 replies 0 retweets 1 like
      4. View other replies
      5. Nick Lockwood ‏@nicklockwood 13 Jan 2014

        @steipete @gparker you clarified the wrong bit ;) Does problem arise from using them as the target, or the value being associated (or both)?

        0 replies 0 retweets 0 likes
      6. Manuel Maly ‏@manuelmaly 13 Jan 2014

        @nicklockwood @steipete @gparker surely means the former, the second wouldn't be a problem with instance deduping.

        0 replies 0 retweets 0 likes
      7. Nick Lockwood ‏@nicklockwood 13 Jan 2014 Westminster, England

        @manuelmaly @steipete @gparker that's what I assumed, but when receiving a dire warning it's best to be clear about these things ;-)

        0 replies 0 retweets 0 likes
      1. Ken Ferry ‏@kongtomorrow 13 Jan 2014

        @gparker que?

        0 replies 0 retweets 0 likes
      2. Ken Ferry ‏@kongtomorrow 13 Jan 2014

        @gparker ah – I get it. you mean don't associate something _to_ a value type. Gotcha.

        0 replies 0 retweets 0 likes
      3. View other replies
      4. Show more
      1. Jeff Kelley ‏@SlaunchaMan 13 Jan 2014 Macomb, MI

        @gparker I’ve been bit hard by NSIndexPath there. Now I convert to strings first.

        0 replies 0 retweets 0 likes
      2. Andrew Mortensen ‏@moretension 13 Jan 2014

        @SlaunchaMan How are you storing the strings, then? Or are you just using the strings for comparisons later?

        0 replies 0 retweets 0 likes
      3. View other replies
      4. Jeff Kelley ‏@SlaunchaMan 13 Jan 2014 Macomb, MI

        @moretension I have it backwards from what @gparker meant, I think. Instead of associating an index path with an object, I use the string.

        0 replies 0 retweets 0 likes
    1. Steve Weller ‏@Bagelturf 13 Jan 2014

      @gparker Can you explain further? What unexpected behavior will occur?

      0 replies 0 retweets 0 likes

    Loading seems to be taking a while.

    Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.

      Promoted Tweet

      false

      • © 2016 Twitter
      • About
      • Help
      • Terms
      • Privacy
      • Cookies
      • Ads info