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 full-size slide

  2. welkom in
    Nederland
    welcome
    willkomen
    bienvenue

    View full-size slide

  3. 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 full-size slide

  4. My First Job

    View full-size slide

  5. Cupertino
    1994

    View full-size slide

  6. 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 full-size slide

  7. 68K Assembly

    View full-size slide

  8. 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 full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  27. Func?
    The
    What
    W F
    T

    View full-size slide

  28. NewtonScript
    What Func?
    The

    View full-size slide

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

    View full-size slide

  30. 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 full-size slide

  31. Dynamic
    What Func?
    The
    Llanguage

    View full-size slide

  32. Dynamic
    Language
    What Func?
    The

    View full-size slide

  33. 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 full-size slide

  34. End of An Era

    View full-size slide

  35. NeXT
    Acquisition

    View full-size slide

  36. Objective C
    1.0

    View full-size slide

  37. Func?
    The
    What

    View full-size slide

  38. AppleScript
    Studio
    What Func?
    The

    View full-size slide

  39. 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 full-size slide

  40. Ruby & Python
    Bridges
    What Func?
    The

    View full-size slide

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

    View full-size slide

  42. JavaScript
    What Func?
    The

    View full-size slide

  43. Objective-C
    2.0

    View full-size slide

  44. Objective-C
    3.0

    View full-size slide

  45. Apple’s Next
    Big Language

    View full-size slide

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

    View full-size slide