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

Apple's Next Big Language

Apple's Next Big Language

In June, 2014, Apple wowed the world with its revelation of the Swift programming language. For years, Mac and iOS developers have speculated about whether and when Apple would create a new language. But for some old timers, Apple has always been creating and adopting new languages. In this talk, Daniel will take you on a historical journey of some of Apple’s more and less well-known pushes to get developers on board with their "big new language."

By Daniel Jalkut: https://red-sweater.com

Powered by http://xebia.com

do{iOS} conference

November 09, 2015
Tweet

More Decks by do{iOS} conference

Other Decks in Programming

Transcript

  1. Apple’s Next Big Language
    Daniel Jalkut
    Red Sweater Software

    View Slide

  2. welkom in
    Nederland
    welcome
    willkomen
    bienvenue

    View Slide

  3. Language

    View Slide

  4. Language
    Dylan
    AppleScript
    EnglishNederlands
    Italiano
    Español
    Deutsche
    Svenska
    ෭๜承 ةيبرعلا
    Türkçe
    Pascal C# PHP
    Haskell JavaScript
    Swift Python Perl
    C++ BASIC
    Ruby
    Objective-C Lisp
    Ӿ෈ िहन्दी Русский
    Français ภาษาไทย

    View Slide

  5. Swift

    View Slide

  6. My First Job

    View Slide

  7. Cupertino
    1994

    View Slide

  8. Carbon
    I N S I D E M A C I N T O S H
    Macintosh Toolbox Essentials
    I N S I D E M A C I N T O S H
    Macintosh Toolbox Essentials

    View Slide

  9. Pascal

    View Slide

  10. View Slide

  11. 68K Assembly

    View Slide

  12. $A86E

    View Slide

  13. A-Traps

    View Slide

  14. The Test

    View Slide

  15. InitToolbox PROC
    StackFrame RECORD {A6Link},DECR
    RetAddr DS.L 1
    A6Link DS.L 1
    LocalSize EQU * ; get size of the local variable allocation
    ENDR
    WITH StackFrame
    LINK A6,#LocalSize
    ** Initialize the managers **
    _MaxApplZone ; allot maximum heap zone for this application
    PEA QD.thePort
    _InitGraf
    _InitFonts
    _InitWindows
    _InitMenus
    _TEInit
    ** Set the cursor to the default "arrow" in case it was something else **
    PEA QD.arrow
    _SetCursor
    ** Here we will set up the menus and display them **
    CLR.L -(A7) ; returns a handle
    MOVE.W #128,-(A7) ; 128 is the rsrc id for the apple menu
    _GetNewMBar
    _SetMenuBar ; Set the Menu Bar to whatever GetNewMBar returned on stack
    CLR.L -(A7)
    MOVE.W #128,-(A7) ; get the Apple Menu handle
    _GetMenuHandle ; Returns the first argument to our next trap call, so leave it
    MOVE.L #'DRVR',-(A7) ; add DA's to the Apple Menu
    _AppendResMenu
    _DrawMenuBar
    ** Now close up the procedure and return **
    UNLK A6
    MOVEA.L (SP)+,A0 ; get the return address
    JMP (A0) ; return
    ENDP

    View Slide

  16. InitToolbox PROC
    StackFrame RECORD {A6Link},DECR
    RetAddr DS.L 1
    A6Link DS.L 1
    LocalSize EQU *
    ENDR
    WITH StackFrame
    LINK A6,#LocalSize

    View Slide

  17. InitToolbox PROC
    StackFrame RECORD {A6Link},DECR
    RetAddr DS.L 1
    A6Link DS.L 1
    LocalSize EQU *
    ENDR
    WITH StackFrame
    LINK A6,#LocalSize

    View Slide

  18. InitToolbox PROC
    StackFrame RECORD {A6Link},DECR
    RetAddr DS.L 1
    A6Link DS.L 1
    LocalSize EQU *
    ENDR
    WITH StackFrame
    LINK A6,#LocalSize

    View Slide

  19. _MaxApplZone
    PEA QD.thePort
    _InitGraf
    _InitFonts
    _InitWindows
    _InitMenus
    _TEInit
    PEA QD.arrow
    _SetCursor

    View Slide

  20. _MaxApplZone
    PEA QD.thePort
    _InitGraf
    _InitFonts
    _InitWindows
    _InitMenus
    _TEInit
    PEA QD.arrow
    _SetCursor

    View Slide

  21. _MaxApplZone
    PEA QD.thePort
    _InitGraf
    _InitFonts
    _InitWindows
    _InitMenus
    _TEInit
    PEA QD.arrow
    _SetCursor

    View Slide

  22. _MaxApplZone
    PEA QD.thePort
    _InitGraf
    _InitFonts
    _InitWindows
    _InitMenus
    _TEInit
    PEA QD.arrow
    _SetCursor

    View Slide

  23. CLR.L -(A7)
    MOVE.W #128,-(A7)
    _GetNewMBar
    _SetMenuBar
    CLR.L -(A7)
    MOVE.W #128,-(A7)
    _GetMenuHandle
    MOVE.L #'DRVR',-(A7)
    _AppendResMenu
    _DrawMenuBar

    View Slide

  24. CLR.L -(A7)
    MOVE.W #128,-(A7)
    _GetNewMBar
    _SetMenuBar
    CLR.L -(A7)
    MOVE.W #128,-(A7)
    _GetMenuHandle
    MOVE.L #'DRVR',-(A7)
    _AppendResMenu
    _DrawMenuBar

    View Slide

  25. CLR.L -(A7)
    MOVE.W #128,-(A7)
    _GetNewMBar
    _SetMenuBar
    CLR.L -(A7)
    MOVE.W #128,-(A7)
    _GetMenuHandle
    MOVE.L #'DRVR',-(A7)
    _AppendResMenu
    _DrawMenuBar

    View Slide

  26. CLR.L -(A7)
    MOVE.W #128,-(A7)
    _GetNewMBar
    _SetMenuBar
    CLR.L -(A7)
    MOVE.W #128,-(A7)
    _GetMenuHandle
    MOVE.L #'DRVR',-(A7)
    _AppendResMenu
    _DrawMenuBar

    View Slide

  27. CLR.L -(A7)
    MOVE.W #128,-(A7)
    _GetNewMBar
    _SetMenuBar
    CLR.L -(A7)
    MOVE.W #128,-(A7)
    _GetMenuHandle
    MOVE.L #'DRVR',-(A7)
    _AppendResMenu
    _DrawMenuBar

    View Slide

  28. CLR.L -(A7)
    MOVE.W #128,-(A7)
    _GetNewMBar
    _SetMenuBar
    CLR.L -(A7)
    MOVE.W #128,-(A7)
    _GetMenuHandle
    MOVE.L #'DRVR',-(A7)
    _AppendResMenu
    _DrawMenuBar

    View Slide

  29. UNLK A6
    MOVEA.L (SP)+,A0
    JMP (A0)
    ENDP

    View Slide

  30. UNLK A6
    MOVEA.L (SP)+,A0
    JMP (A0)
    ENDP

    View Slide

  31. UNLK A6
    MOVEA.L (SP)+,A0
    JMP (A0)
    ENDP

    View Slide

  32. UNLK A6
    MOVEA.L (SP)+,A0
    JMP (A0)
    ENDP

    View Slide

  33. C and C++

    View Slide

  34. void InitializeToolbox(void)
    {
    MenuHandle AMenu;
    MaxApplZone();
    InitGraf(&qd.thePort);
    InitFonts();
    InitWindows();
    InitMenus();
    TEInit();
    SetMenuBar(GetNewMBar(128));
    AMenu = GetMHandle(128);
    AddResMenu(AMenu, 'DRVR');
    DrawMenuBar();
    }

    View Slide

  35. Func?
    The
    What
    W F
    T

    View Slide

  36. NewtonScript
    What Func?
    The

    View Slide

  37. What Func?
    The
    Photograph by Rama, Wikimedia Commons, Cc-by-sa-2.0-fr

    View Slide

  38. What Func?
    The
    y := { YMethod: func () print("Hello") };
    x := { HelloWorld: func () begin
    self._parent := y;
    self:YMethod();
    self.WorldMethod := func ()
    print("World");
    self:WorldMethod();
    end
    };
    x:Demo();

    View Slide

  39. Dynamic
    What Func?
    The
    Llanguage

    View Slide

  40. Dynamic
    Language
    What Func?
    The

    View Slide

  41. What Func?
    The
    define function make-fibonacci()
    let n = 0;
    let m = 1;
    method ()
    let result = n + m;
    n := m;
    m := result // return value
    end
    end;
    define constant fib = make-fibonacci();
    for (i from 1 to 15)
    format-out("%d ", fib())
    end;

    View Slide

  42. End of An Era

    View Slide

  43. NeXT
    Acquisition

    View Slide

  44. Java!?

    View Slide

  45. Objective-C

    View Slide

  46. Objective C
    1.0

    View Slide

  47. Func?
    The
    What

    View Slide

  48. AppleScript
    Studio
    What Func?
    The

    View Slide

  49. What Func?
    The
    script AppDelegate
    property parent : class "NSObject"
    -- IBOutlets
    property theWindow : missing value
    on applicationWillFinishLaunching_(aNotification)
    -- Initialize
    end applicationWillFinishLaunching_
    on applicationShouldTerminate_(sender)
    -- Terminate
    return current application's NSTerminateNow
    end applicationShouldTerminate_
    end script

    View Slide

  50. Ruby & Python
    Bridges
    What Func?
    The

    View Slide

  51. What Func?
    The
    class AppDelegate
    attr_accessor :the_window
    def applicationDidFinishLaunching (note)
    # Initialize
    end
    def applicationWillTerminate (note)
    # Terminate
    end
    end

    View Slide

  52. JavaScript
    What Func?
    The

    View Slide

  53. Objective-C
    2.0

    View Slide

  54. Objective-C
    3.0

    View Slide

  55. Swift

    View Slide

  56. Apple’s Next
    Big Language

    View Slide

  57. Thank You
    red-sweater.com @danielpunkass coreint.org

    View Slide