Oppenheimer Film Discussion for Philosophy and Film
Principles Of Programing Languages
1.
2.
3.
4. IMPLEMENTATIONS OF PRINCIPLES
SMALLTALK
Abstraction – Common behaviors factored into base classes.
Encapsulation – Implementation details hidden.
Manifest – Interface to object is its protocol.
Regularity – Everything is an object.
Security – Method not found
Simplicity – Only messages passed to objects.
Orthogonality– Hierarchal sub classing precludes true classification.
– Requires multiple inheritance, delegation or AOP
4
5. IMPLEMENTATIONS OF PRINCIPLES
LISP
Abstraction – Common functions can be mapped to any list.
Manifest – Functional inputs & outputs are apparent.
Regularity – Everything is a function.
Structure – All code & data in a lists with no distinction.
Simplicity – Recursive control structures.
Syntax – Changing interpretive syntax is trivial.
0 1 Infinity – Lists can have 0 1 or infinite number or elements.
5
6. IMPLEMENTATIONS OF PRINCIPLES
WITH DYNAMIC LANGUAGES, STRONG TYPING, DSLS & JVM
Automation – Dynamic languages reduce boilerplate.
Defense – Strong typing catches errors that get through syntax.
Labeling – Associative or property lists.
Localized – Defaults in constructors minimize permutations.
Portability – JVM & advanced IDEs: IntelliJ, Netbeans & Eclipse.
Preservation – DSLs & dynamic languages align to business logic.
6
7. LANGUAGE PARADIGMS
Intrinsic Implementation of Design Patterns
“All roads lead to NFJS” see:
Neal Ford – “Design Patterns in Dynamic Languages”
Venkat Subramaniam - “Design Patterns in Java and Groovy”
Dynamic Programming
Ola’s Language Pyramid
Polyglot Approach
Neal Ford - http://github.com/nealford/presentations/blob/master/Design Patterns in Dynamic Languages (Neal Ford).pdf
Venkat - http://www.agiledeveloper.com/presentations%5Cdesign_patterns_in_java_and_groovy.pdf
7
8. Dynamic Languages
• Runtime extension & execution of behavior
• Add code, extend objects & modify type system
• Closures – functions that retain their creation context.
• Duck Typing – freedom to call methods on any object.
• JVM support, but not optimized
8
9.
10. POLYGLOT PROGRAMMING
• EMacs = C kernel + Lisp scripts.
• Web is inherently polyglot: HTML, CSS & Javascript.
• Pluses: Targeted productivity & performance.
• Minuses: Increased complexity & tests
• A full polyglot approach is a lot for in house.
• The best approach to Ola’s Pyramid is to start with:
Ruby on Rails, Grails or Scala’s Lift
Dean Wampler http://polyglotprogramming.com/
10
11. LANGUAGE INSPIRATIONS
Smalltalk – Pure OO with dynamic programming
Lisp – State of the art FP.
Java – Mainstream OO & the JVM ecosystem
Ruby – Brought back dynamic programming
Groovy – Dynamic Java with sophisticated DSLs
Scala – A Multi Paradigm OO & FP Hybrid
Clojure – A concurrent & general purpose JVM Lisp
11
12. LISP
• In 1987 & 1991 I wrote symbolic math libraries in Lisp.
• FP & recursion were a positive influence on my C++ apps.
• Integration with C scientific & OpenGL libs was tough.
• Lisp needed a bigger ecosystem with JVM APIs.
12
13. SMALLTALK
• In 1993 I wrote a Smalltalk persistence library ~ GORM.
• But team wanted a fully transparent ORM.
• Smalltalk had great dynamic programming.
• But team went to too far seeking instant OO nirvana.
• For individuals the GUI was great. The first IDE.
• But the GUI had a bubble effect, adverse to SCM.
13
14. JAVA
• Implemented Smalltalk’s OO & simulation paradigm.
• Brought OO & the JVM to a large group of developers.
• But bloated frameworks threaten productivity.
• Java 7 closures & dynamic invocation are significant.
• We would probably not be meeting if not for Java.
JAVA FX
• Innovative scene graph approach.
• Scene graph API should be have callable by Java.
• Would have made a great Groovy / Griffon DSL.
• A missed opportunity for revitalizing Java GUI.
14
15.
16.
17.
18.
19.
20. DJUG LANGUAGE PANEL
APRIL 14, 2010
Ruby - Frederick Jean
Groovy -
Scala - Tom Flaherty
Clojure - Daniel Glauser
Polyglot - Venkat Subramaniam
20