Resolved Language Debates?

As you may have noticed my emphasis on polyglot programming on this blog.  I’ve been following the language design of Ola Bini’s Ioke with some intrigue as well as dipping my foot into languages such as Clojure.  Just as well, with some lists as Michael Feathers about his “Wish List for the Next Mainstream Programming Language” has me enumerating what pieces I’d like as well.  While doing some more investigation on the subject, I came across a post on Lambda the Ultimate entitled “What Are The Resolved Debates in General Purpose Language Design?”.  That got me asking the same question to myself, so, what are they?  The thread is a great read, especially if you’re a language enthusiast as I am.

What Are They?

There are quite a few unresolved language debates, especially in regards to dynamic versus static typing.  I don’t quite think this “issue” will be resolved any time soon.  Just as any debate between functional programming languages versus object oriented and imperative languages.  In terms of mainstream popularity, it’s not hard to argue that object oriented and imperative programming languages have ruled, although we’re starting to see greater traction of functional programming features lately.  And that brings us to our first point.

One of the  first subject that comes up is with first-class functions, which is to say that functions are treated as first class objects.  With the upcoming C++0x standard, the addition of lambda syntax is a step in the right direction.  It’s great to see that the Visual Studio VC2010 edition will also support this part of the standard, whenever it decides to become ratified.  Now, Java on the other hand has continued to play it conservative and not add closures to the Java 7 specification even still.  So, in a way, outside of Java, functional programming constructs are making some headway, although you could say Java has had support for first-class functions, just not closures. 

There are other points listed here which mostly rattles off a lot of the functional programming wish list.  As you might imagine, the crowd of Lambda the Ultimate is kind of skewed that way.  I tend to favor those functional approaches as well which includes support for:

  • First class functions
  • Immutability (both shallow and deep)
  • Tail Recursion with Tail Call Optimization
  • Currying
  • Closures
  • Laziness
  • DbC enforcements
  • Explicit effects

Ultimately though, I think there is a bright future for such languages that take a hybrid approach which supports both object oriented and imperative constructs, but encourages a functional approach.

Going Forward into Concurrency

What are some of the things we should be thinking about going forward?  Concurrency is one of the big hot topics coming about.  Many languages are now starting to think about concurrency in their language designs and the its associated framework.  Lately, I’ve been reading Joe Duffy’s Concurrent Programming on Windows which has opened my eyes to more possibilities and abstractions.  But as well, it’s raised a lot more interesting questions 

There are many ways to achieve concurrency, yet like many of the other issues discussed in the thread, remains largely unsolved.  For example, we have Erlang, and to a degree Scala, that follows the actor model style of concurrency, which allow for communication between actors with mailboxes.  Just as well, we have Clojure, which is built upon the concepts of Software Transactonal Memory, which give us explicit APIs for dealing with mutable state.

One problem especially in the .NET and Java world has been that we’ve been thinking at a very fine grained level, of what I call the assembly level of concurrency around locks, mutexes and semaphores.  In order to be effective at concurrency oriented programming, we need a high level of abstraction than that in order to bring concurrency more to the masses.  But what will it be?  I think the Parallel Extensions to .NET and Java 7’s join-fork are steps in the right direction as well for .NET and Java respectively.

Conclusion

It’s an interesting debate to see which language features are now being considered “solved” but as well to see where we still aren’t quite there yet.  Such topics that remain a point of contention circle around dynamic versus static typing, but also extend to such problems as dealing with concurrency.  So, the question is, what is it that wasn’t in this thread nor mentioned here is already “solved” and what other points of contention are there?

No Comments