Developer Day Notes 9: Programming In Interesting Times

by Russ Olsen

“I think we’re really living in interesting times in terms of technology, in terms of programming.” Back at the start of his career in 1980 (“Dawn of Time”) every programmer was in one of two parts of Hell: the only options were Cobol (the west side) or, what he did, Fortran (the east side). “There was no lower-case in Fortran, so you were pretty much always screaming at yourself.”

He read an article guessing what programming in the 21st century would look like (eg. where we are now) and the author admitted to not knowing what sort of language would be used or what the problems would be, but claimed that programming language would be called Fortran. “We were never going to get rid of Fortran, ever.” Scarily, Cobol and Fortran were so dominant it seemed like he may be right.

But there were some weeds growing in the cracks: C, Smalltalk, Ada… an interesting time to be programming.Wwe settled on C, progressed to C++, progressed to Java. Then Java. Java. Java. Another monoculture!

And then sometime around 2006 people got frustrated with Java and Rails was the crack in the dike that got mainstream programming talking about languages, and the interesting times are back.

So the goal for today is to tour the languages Olsen has his eye on.

Criteria

Successful languages need something old, new, borrowed, blue.

Old: the early days of Fortran involved inventing everything: nearly the first compiler, the runtime, documentation, invent the language, everything from scratch! It just doesn’t happen anymore, the standards are so high. So every language builds on another. Python built on Perl [he means ABC]. C borrowed from Fortran; C++ from C; Java from C/C++; Ruby borrowed from SmallTalk.

New: A language needs to has to be “really better” to justify the time it takes to learn, resources to support. C wasn’t Fortran; C++ added objects to C; Java added objects to C (again) and was cross-platform; Ruby is dense and has some metaprogramming.

Borrowed: Have to take good things from the surroundings. C lifted from everywhere and rolled them up; C++ found OO; Java “invented” the VM; Ruby stole liberally from SmallTalk.

Blue: (stretches the analogy, but…) Thinking of IBM here, the support to get big. In other words, luck. Java had Sun; Ruby filled a desperate need.

Curb appeal is also important, when you look at a house from the curb and instantly fall in love. SmallTalk didn’t have it. Python’s hamstrung by significant whitespace. Ruby is nice. People who come to a Saturday conference will be up for almost anything, but the 9-to-5 crowd has a vote here [die scum].

The Contenders

Groovy

Basically Java (100% compat) without the noise. Probably the language Olsen knows best. Has Java, knows Ruby… but suffers from trying to combine static with age and complexity with dynamic fun stuff, “it’s not an easy marriage”. Classes are almost exactly Ruby. Judgement: There doesn’t seem to be quite enough new, it won’t displace Java.

Scala

JVM Based, not 100% Java compat. Functional and object-oriented. Static typing can be quite complex (and not just from the perspective of a Ruby programmer). Avoids state and side effects, which is nice for multithreading.

Concurrency via Actors, which are concurrent processes with message queues that are the only way data flows. Harder to screw up the threading.

Code samples look a fair bit like Java at first, but some of the typing can get imposing. Looks like it and Groovy are going to be in a deathmatch for “The Better Java”, mostly fighting about typing.

Clojure

JVM based but not like Java: it’s a Lisp variant! Real metaprogramming, dynamic typing, functional (well, mixed because Java stuff you call isn’t). Concurrency via STM, which is analogous to a database transaction.

Samples… yeah, get your parenthesis on! And that’s the problem with Lisp, it doesn’t have curb appeal, the 9-to-5ers can’t get over it.

Erlang

Not JVM, has its own VM and consequently the most functional of the contenders. Dynamically typed, also uses Actors. Hot-swappable code, which is quite neat.

Hello worldis simple. Factorial does pattern matching, which Olsen likes. The socket server example lacks curb appeal. Audience pipes up to gripe that Erlang has C-like “array of bytes” for strings.

Reia

Runs on Erlang VM and looks like Ruby. Quite a lot, really… well, except that nifty pattern matching. Not purely functional. Smells like how Ruby was great because it took great things from the unsexy SmallTalk, maybe Reia could do it for Erlang.

Conclusion

So, what will things look like in 30 years?

Olsen have a friend who, since 1980, has only coded in Fortran. Living in interesting times is a choice. What is yours?

Q&A

Q: No JavaScript? A: “I vacillated.” Ultimately decided the audience probably knew it better. Considers it a serious and interesting language because of Rhino.

Q: Aside from obvious curb appeal problem, Haskell? A: Fails a test I didn’t get into: when the people who know it spend their time arguing what a given program means, stay away.

Q: .Net? A: “Uhhhh…’ (Audience: …that’s still the west side of hell!) Olsen said he’s just not familiar with the platform.