Upgrade to Pro — share decks privately, control downloads, hide ads and more …

A Eulogy for Objective-C — Aaron Hillegass

1fa9cb8c7997c8c4d3d251fb5e41f749?s=47 Realm
June 12, 2015

A Eulogy for Objective-C — Aaron Hillegass

A discussion of the purpose and history of Objective-C. Will include a look at how Swift continues that purpose while using more modern language constructs.

This talk was presented at AltConf in June 2015.

1fa9cb8c7997c8c4d3d251fb5e41f749?s=128

Realm

June 12, 2015
Tweet

Transcript

  1. A Eulogy for Objective-C Aaron Hillegass aaron@bignerdranch.com @AaronHillegass

  2. My books

  3. I love Objective-C

  4. Simula-67 • First object-oriented language • Used to write simulations

    rg:- New Edge (67,28);
 length :- rg.length;
  5. Smalltalk (1980) • Untyped • Message-based myButton := Button new.


    myButton label:'press me'.
 myButton action:[ myView displaySum ].

  6. Steve Jobs at Xerox PARC • https://www.youtube.com/watch? v=vpMeFh37mCE

  7. Brad Cox and Tom Love

  8. Objective C (1986) • Generated C • No reference counts

    • ICpak 210 — GUI framework
  9. Why Object-Oriented?

  10. NeXTstep (1988)

  11. Steve Naroff and Blaine Garst

  12. Dynamic • Introspection (KVC) • Loose typing (Unarchiving, target/action) •

    isa-swizzling (Faults) • Creating classes at runtime (KVO)
  13. Categories rule! Foundation AppKit - [NSString length] - [NSString drawInRect:withAttributes:]

  14. The worst book ever written

  15. A much better book

  16. OpenStep (1994) • Retain counts • NS prefix • More

    explicit method names
  17. GNUstep

  18. WebObjects + Windows

  19. Fragile base class problem NSObject NSView MyView

  20. Objective-C 2.0 (2006 - 2012) • Eliminated fragile base class

    problem • Fast enumeration • Garbage collection then ARC • Blocks And, yeah, properties too.
  21. Pandering • Dot notation • Subscripting

  22. Stabs at concurrency • NSThread and NSLock • @synchronize •

    NSOperationQueue Most successful? NSRunLoop
  23. Swift is a step forward • Less C • More

    terse syntax • More pedantic type system • Fewer files
  24. Swift is a mutt 
 [myString insertString:”Ping” 
 atIndex:12] myString.insert(string:”Ping”,

    index:12) myString.insertString(“Ping”, index:12)
  25. Objective-C is not really dead.

  26. Big Nerd Ranch • We teach • We write apps

    • We write books • Do you? http://bignerdranch.com/
  27. A Eulogy for Objective-C Aaron Hillegass aaron@bignerdranch.com @AaronHillegass