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

FP vs OOP

FP vs OOP

Dyadic and Triadic <=> FP and OOP

Keisuke KATO

August 28, 2015
Tweet

More Decks by Keisuke KATO

Other Decks in Programming

Transcript

  1. async function aboutMe() { let profile = { name: “Keisuke

    Kato” , twitter: “@k_kato” }; try { return await followTwitterAsync(profile); } catch (e) { return await sendMailAsync(profile); } }
  2. Signifié et Signifiant ‡Ferdinand de Saussure, “Un signe linguistique est

    l'union arbitraire et conventionnelle d'un signifiant et d'un signifié”, http://www.ac-grenoble.fr/PhiloSophie/logphil/notions/langage/convers/textes/saussure/signe.htm ‡Wikipedia, “Signifié et signifiant”, https://fr.wikipedia.org/wiki/Signifi%C3%A9_et_signifiant le signifié le signifiant “cheval” signifie signifiant “Nebuchadnezzar's key”
  3. The Babylonian Confusion ‡Tanaka-Ishii, Kumiko. Semiotics Of Programming. p.25. New

    York: Cambridge University Press, 2010. Print. 対象 object representamen 表意体 interpretant 解釈項 シニフィエ signifie signifiant シニフィアン “Nebuchadnezzar's key” Dyadic ( 二元論 ) Triadic ( 三元論 )
  4. Dyadic and Triadic ‡Tanaka-Ishii, Kumiko. Semiotics Of Programming. pp.27-28. New

    York: Cambridge University Press, 2010. Print. What Dyadic model ( 二元論 ) Triadic model ( 三元論 ) Who Augstine, Saussure Plato, Aristotle, Peirce When 4th centry 5th centry BC Where Algeria, Switzerland Greece, US Why ? ? How signifian -> signifie representamen -> intepretant -> object
  5. Dyadic and Triadic - FP vs OOP • Dyadic and

    Triadic • 5th centry BC : Triadic • 4th centry : Dyadic • Modern : Dyadic and Triadic • FP vs OOP • 1958 : FP (LISP) • 1967 : OOP (Simula) • Moden : FP vs OOP ‡Tanaka-Ishii, Kumiko. Semiotics Of Programming. pp.27-28. New York: Cambridge University Press, 2010. Print. ‡Wikipedia, “Functional programming history”, https://en.wikipedia.org/wiki/Functional_programming#History ‡Wikipedia, “Object-oriented programming history”, https://en.wikipedia.org/wiki/Object-oriented_programming#History ‡Tanaka-Ishii, Kumiko. Semiotics Of Programming. pp.27-28. New York: Cambridge University Press, 2010. Print.
  6. FP -> Haskell data Key = NebuchadnezzarKey String use(NebuchadnezzarKey door)

    = "open the door to "++door main = let key = NebuchadnezzarKey "Human Instrumentality" in putStr(show (use key)) ‡Tanaka-Ishii, Kumiko. Semiotics Of Programming. p.12. New York: Cambridge University Press, 2010. Print.
  7. OOP -> Java ‡Tanaka-Ishii, Kumiko. Semiotics Of Programming. p.14. New

    York: Cambridge University Press, 2010. Print. class Key { String door; Key(String door) { this.door = door; } public String use() { return "open the door to " + door; } } class NebuchadnezzarKey extends Key { NebuchadnezzarKey(String door) { super(door); } } void run() { NebuchadnezzarKey key = new NebuchadnezzarKey("Human Instrumentality"); System.out.println(key.use()); }
  8. Haskell -> Dyadic data Key = NebuchadnezzarKey String use(NebuchadnezzarKey door)

    = "open the door to "++door signifie signifiant NebuchadnezzarKey use door
  9. Java -> Triadic class Key { String door; Key(String door)

    { this.door = door; } public String use() { return "open the door to " + door; } } class NebuchadnezzarKey extends Key { NebuchadnezzarKey(String door) { super(door); } } object representamen interpretant NebuchadnezzarKey door use
  10. Dyadic and Triadic ⇔ FP vs OOP signifie signifiant NebuchadnezzarKey

    use door object representamen interpretant NebuchadnezzarKey door use ‡Tanaka-Ishii, Kumiko. Semiotics Of Programming. pp.38-39. New York: Cambridge University Press, 2010. Print.