newspeak its children avarice and sloth
play

Newspeak & its Children: Avarice and Sloth Gilad Bracha - PowerPoint PPT Presentation

Newspeak & its Children: Avarice and Sloth Gilad Bracha Ministry of Truth Thursday, June 11, 2009 1 Functional Object- Oriented Programming No contradiction FP is computational paradigm OO is an organizational one Thursday, June 11,


  1. Newspeak & its Children: Avarice and Sloth Gilad Bracha Ministry of Truth Thursday, June 11, 2009 1

  2. Functional Object- Oriented Programming No contradiction FP is computational paradigm OO is an organizational one Thursday, June 11, 2009 2

  3. FOOP is Spreading OCaml/F# Scala Thursday, June 11, 2009 3

  4. Pure FOOP Purely Object-Oriented Purely Functional Thursday, June 11, 2009 4

  5. Purely Object-Oriented Everything is an Object Thursday, June 11, 2009 5

  6. Purely Functional HOFs Referentially transparent Lazy? Thursday, June 11, 2009 6

  7. Newspeak Avarice Sloth Thursday, June 11, 2009 7

  8. Newspeak The “Mother of all sins” Mother and Sin share common OO structure Thursday, June 11, 2009 8

  9. Newspeak Message based No global scope Thursday, June 11, 2009 9

  10. Message-based All operations are “message sends” All names are late bound, depending on their receiver Thursday, June 11, 2009 10

  11. Program to an Interface not an Implementation Thursday, June 11, 2009 11

  12. No References to Variables Representation Independence Always use slots via accessors id = letter, (letter | digit) star. Thursday, June 11, 2009 12

  13. No References to Classes Always use accessors Classes are first class objects Concepts are phenomena Thursday, June 11, 2009 13

  14. No Global Scope As in lambda calculus Newspeak is almost as simple as a class calculus Thursday, June 11, 2009 14

  15. Ban Imports! No packages, assemblies, modules, ... No imports, using clauses, ... Top level classes define modules Thursday, June 11, 2009 15

  16. How does it work? Tools provide any required top level namespace Aggregation makes parameterization manageable at top level Nesting handles the rest Thursday, June 11, 2009 16

  17. Nested Classes Nested as in Beta, not as in Java Great for Modeling Natural Modularity Solution Thursday, June 11, 2009 17

  18. Message-based Nested Classes Classes are always virtual Classes are always mixins Class hierarchy inheritance Thursday, June 11, 2009 18

  19. Practical Benefits Side-by-side deployment Polymorphism over entire libraries Security Thursday, June 11, 2009 19

  20. Security Implications No Ambient Authority Object capability model Object reachability defines authority Thursday, June 11, 2009 20

  21. Beyond Baked Thursday, June 11, 2009 21

  22. Concurrency? Actors Value types A slippery slope into Avarice and Sloth Thursday, June 11, 2009 22

  23. Newspeak Avarice Sloth Thursday, June 11, 2009 23

  24. Newspeak vs. Avarice class Foo { | x y ::= 2 * x. z = y + 3. | } ... Thursday, June 11, 2009 24

  25. Newspeak vs. Avarice class Foo { | x y ::= 2 * x. z = y + 3. | } ... Thursday, June 11, 2009 25

  26. Newspeak vs. Avarice class Foo { | x = 0. y = 2 * x. z = y + 3. | } ... Thursday, June 11, 2009 26

  27. Newspeak vs. Avarice class Foo { || x = 0. y = 2 * x. z = y + 3. || } ... Thursday, June 11, 2009 27

  28. Newspeak vs. Avarice Eliminate mutable slot declarations Hide order of slot initialization Change libraries: Object identity Reflective modification Application libraries Thursday, June 11, 2009 28

  29. Avarice is a proper subset of Newspeak Newspeak Avarice Thursday, June 11, 2009 29

  30. Avarice and Sloth: Same syntax, different semantics Avarice Sloth Applicative order Normal order Thursday, June 11, 2009 30

  31. Pattern Matching? Only if we preserve data abstraction Everything is an object First class patterns and queries Thursday, June 11, 2009 31

  32. Typechecking? Pluggable type system planned Type system is a priority - the lowest one Non-trivial Classes, superclasses all dynamically bound Thursday, June 11, 2009 32

  33. Status Available at http://newpeaklanguage.org open source under Apache 2.0 license Work in Progress Expect some tweaks to syntax and semantics Implementation still not complete - especially libraries Thursday, June 11, 2009 33

  34. Connections Mirrors Self Strongtalk, JDI, APT ... See OOPSLA 04 No static Scala E Thursday, June 11, 2009 34

  35. Connections Security E (Miller 06) Java Modules Jigsaw, 1991 Units ML Fortress Thursday, June 11, 2009 35

  36. Connections Message-based programming Emerald, Trellis/Owl Smalltalk Self Virtual Types Beta, gBeta, Scala, CaesarJ, Tribe... Hierarchy inheritance: Ossher & Harrisson 92, Cook 89 Thursday, June 11, 2009 36

  37. Credits Peter Ahe Vassili Bykov Yaron Kashai Bill Maddox Eliot Miranda Thursday, June 11, 2009 37

  38. This file is licensed under the Creative Commons Attribution ShareAlike 3.0 License. In short: you are free to share and make derivative works of the file under the conditions that you appropriately attribute it, and that you distribute it only under a license identical to this one. Official license . The Newspeak eye used in the bullets, slide background etc. was designed by Victoria Bracha and is used by permission. Thursday, June 11, 2009 38

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend