Principles Of Programing Languages

  • 1,018 views
Uploaded on

Tom Flaherty at Ignite night at the Denver Open Source Users Group

Tom Flaherty at Ignite night at the Denver Open Source Users Group

More in: Education , Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
1,018
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
0
Comments
0
Likes
2

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. 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
  • 2. 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
  • 3. 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
  • 4. 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
  • 5. 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
  • 6. 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
  • 7. 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
  • 8. 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
  • 9. 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
  • 10. 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
  • 11. DJUG LANGUAGE PANEL APRIL 14, 2010 Ruby - Frederick Jean Groovy - Scala - Tom Flaherty Clojure - Daniel Glauser Polyglot - Venkat Subramaniam 20