Emerging Programming Languages Faceoff SDForum Panel
2010, Mar 10 — ...
The SDForum Emerging Technology SIG had a very interesting panel on March 10, 2010 regarding emerging languages. The SIG organizers came up with the topic by posing the question, "if you're going to put together a web app, what language would you use?" I thought that this panel was very informative, the questions were deep and mostly on topic, and the panelists were knowledgeable. The only problem was that the presentations were lightning fast so I could take notes fast enough butit only felt too fast from a note taking perspective.
There were panelists representing the following programming languages:
- Clojure - Amit Rathore, author of the forthcoming "Clojure In Action"
- Ruby - Evan Phoenix, lead developer of Rubinius, a high performance Ruby VM
- Scala - David Pollak, lead author of Lift
- Go - Robert Griesemer, Google, co-author of Go
- The Go Programming Language by Robert Griesemer
- Scala? by David Pollak
- Clojure: A Quick Introduction
- The idea started off with: "If you're going to put together a web app, what language would you use?"
- Clojure
- by Amit Rathore, CSA, Runa
- 90% of the system is in Clojure
- clojureinaction.com
- new, dynamic, functional, concurrent, LISP, runs on JVM
- LISP = lost in a sea of paratheses
- Clojure has less parens than Java
- Functional
- higher-order functions
- allows you to create flexible functions
- map, reduce, filter
- accepts other functions and can do something
- immutable data-structures
- lazy sequences
- can create infinite lists of data
- can create all Fibonacci numbers and then just grab a few of them
- higher-order functions
- Concurrent
- the multi-core function
- by multi-threading
- but there are problems
- lost updates
- dirty reads
- more...
- solutions
- locks
- but they are painful
- also very manual, brittle to change, knowledge is not in the code
- locks
- Another way?
- identity vs. state
- identity: favorite movies
- state: values like Up, Big Fish
- state might change
- new model
- series of values that are differenent over time and each are immutable with a special reference that points to these data structures
- reads are safe becaue immutable
- managed writes
- lock-free
- language level support
- an STM system (software transaction in member)
- mutable state needs special references
- mutation happens inside a txn
- rollbacks, rollback
- change management happens under the hood
- Clojure has efficient immutable data-structures
- shares the structure is what makes it fast
- refs, agents (async, independent), atoms, vars
- JVM
- embraces the JVM
- seamless interop
- nicer for Java than Java itself
- can implement interfaces
- type-hints (tell it what the type is to avoid reflection)
- LISP
- homoiconic - code is data
- () creates lists
- [] is vectors
- reader
- converts code into data structures, programmer has control; can manipulate data structures (code) before it goes to the next step (execute)
- can create new language features that are not already there
- e.g. can define a new language feature like "unless"
- bottom-up
- model low-level attributes and combine them into a more complex functionality that will execute
- Hmm, combine many data sources to create a single view?
- REPL integration
- rapid prototyping
- hot code-swap
- built on abstractions
- ISeq
- it is not just OO and polymorphic, it is more than that
- dynamic scope
- list comprehensions
- Why would you consider this language?
- Can create your own domain language.
- Runa replaced Rails with Clojure
- Fast
- Lib support from Java
- Ruby
- by Evan Phoenix from Engine Yard
- dynamic language
- pure OO language, everything is an object
- everything is a method call
- GC'd
- wide and elegant syntax, principle of least surprise
- Ruby has multiple implementations
- JRuby is an implementation that is built on top of the JVM
- Has the normal thread concept
- Varies between implementations
- Green thread? It is implementation details.
- MRI is at version 1.8 and uses green threads
- MRI 1.9 moves to native threads
- JRuby uses Java threads
- Any language facilities to make multi-thread easier?
- Not really. No STM.
- Compared to SmallTalk
- Ruby started off looking like LISP and Max was trying to merge a LISP with a SmallTalk with some Perl thrown in
- Execution is almost identical to SmallTalk
- Elegant language but grew organically so there are edge cases
- Is the main application for web application?
- Not necessarily
- Was not in the web domain 6 years ago
- Used it for system programming on appliances
- Gained notoriety because of RoR
- Compared to Python
- Python likes to emphasize there is one way to do it and if you don't like it tough
- Ruby everything is an object
- Some similarities in syntax to python
- Ruby emphasizes happy programmers and beautiful programs
- Where should you not use it?
- Multi-threaded and timing sensitive
- Scala
- by David Pollak
- Hybrid Functional-OO lang
- Native speed on JVM
- Java interop
- 7 years old, version 2.8, Odersky
- Lift web framework
- Who uses it?
- Novell
- Foursquare
- and so on
- LinkedIn was using a lot of Groovy for productivity
- Came to a talk about Scala and found a match
- Twitter, at the time MRI was not stable enough and moved to Scala
- Foursquare re-written in 3-4 months
- Programmer productivity of Ruby but the reliability of Java
- Love child of Ruby, Java, and Pascal
- Conciseness of Ruby
- Static nature of Java
- Type system that is powerful for architect but daily programming the type system doesn't get in the way
- Tons of immutable classes/collections
- strict & lazy
- immutable xml and JSON
- Parallel collections
- Ships w/actor lib
- Library level STM
- Lib & type checker -> correctness
- Separates architects from coders
- Great community
- Future
- 2.8 with IDE support
- Simple Build Tool
- Lift: Beyond comet
- Akka & Goat Rodeo: Cloud
- Lift is a web framework like RoR
- Go
- by Robert Griesemer
- worked on it since inception 2 years ago
- Experimental
- Open source
- Concurrent
- GC'd
- Systems language
- Could possible write an operating system in it
- imperative
- statically typed
- control over memory layout
- source code is UTF-8 and can use unicode in the code
- Motivation
- frustration with state of the art in systems programming
- There are many statically typed, imperative, compiled languages
- verbose, lots of repetition
- types get in the way as much as the help
- build times matter
- insuffiecient dependency control
- Dynamic and functional languages socle come problems
- Go Aproach
- Keep it simple and powerful
- Make programming about solving the problem and not the programming language
- Keep it simple and powerful
- Methods for any Type
- Very much like C but fixed some of the problems
- Declarations are directly from Pascal
- No support for OO in the classical sense
- Allow methods for any type
- Abstract Types
- an interface is a type that specs a set of methods
- Any value with these methods satisfies the interface
- Do not have to declare the dependency -- no class hierarchy
- No inheritance in the classical sense
- The hierarchy is implicit, if the type implements everything about the interface; it is a subtype
- Main building block is struct and you can "mix in" other structs so you get the same effect as data inheritance
- No inheritance in the classical sense
- Concurrency
- Cheap an easy to create flow controls
- Synchronization
- Use explicit message to comma and synchronization
- Communication in addition to synchronization
- In Go you can create 100k channels and take then down
- Go Status
- 2 independent compiles
- Growing standard lib
- Portable, open source
- Mercurial source control
- Next steps
- Generics
- Operator methods
- Exception handling
- Better garbage collector
- Not quite ready for prime time (needs half a year)
- Go has first class functions
- Some people compare Go to Python but not really
- Has some of that feel of a scripting language
- Reduces build times and good execution times
- Something that is close to C in executions.
- Keep the language contracts simple an close to the metal
- There is no VM
- Doesn't necessarily need a VM.
- The runtime has support for memalloc and GC
- Language lib
- Want it to be a systems language
- Would like the option to remove GC and be able to write an OS
- by Robert Griesemer
- Q&A
- Scala 2.8 has continuations and somebody implemented GOTO
- TDD
- Clojure
- You can use Java framework
- TestIs comes with it
- Needed simple mocking and stubbing and wrote in 50-60 lines of code
- Can write your own
- Ruby
- TestUnit
- Arspect [sic]
- Testing mantra is deep
- Scala
- Same as Java
- Specs
- ScalaTest
- Behavior Driver Design
- Backdoor Scala into Java environ by writing tests in Scala
- ScalaCheck - legal bounds should be for calling a particular method
- Go
- Clojure
- Is Scala more OO or more functional?
- Depends on the day of the week.
- When the speaker first started with Scala, didn't think functional
- Had a rule: write immutable unless you can justify not
- IDE support?
- Clojure - Emacs
- talk to a running process as you are running your code
- using the REPL changes the way you develop code
- write a little code, satisfied; write a test
- code is data
- all language are moving towards LISP
- any non trivial program has a buggy version of LISP in it
- Ruby
- There are bunch of IDEs and people like them
- Netbeans, Eclipes, RubyMine
- Scala
- Has a REPL
- IRB
- IDE support through 2.7 was marginal
- IDE support comes with Scala 2.8
- Textmate and Emacs
- Go
- Go mode for Emacs
- Go config for Xcode
- Clojure - Emacs
- What is the size of the core set of constructs you need to be successful?
- Clojure
- About a dozen concepts
- Simpler or as simple as scheme
- Clojure
- Social networking sites
- Scala
- Backend is great for systems that require async
- Lift is great for the front end and comet
- Be able to do replay attacks with Lift
- Scala