Metacircular thoughts

December 25, 2007

Working through Concepts, Techniques, and Models of Computer Programming

Filed under: Language pissing matches, Language snobbery, Politics — metacircular @ 12:05 am

I am working through the famous CTM book, which looks like it could be like SICP for grownups.

CTM uses a language and platform called Mozart/Oz, which is freely downloadable and easy to get started with.

The development environment includes an Emacs-based REPL. It’s very easy to get started.

15 minutes after installing the program, I was able to code up the classic tail-recursive factorial:


declare
fun {Fact N}
   fun {FactIter N Acc}
      if N == 0 then
	 Acc
      else
	 {FactIter N-1 Acc*N}
      end
   end in {FactIter N 1}
end

{Browse {Fact 23}}

The first part defines our factorial function, and the second evaluates 23! and displays the result in the browser, which will be familiar to anyone who use has used Common Lisp.

(Yes, Oz has arbitary-precision integer arithmetic built in, like any sane modern programming language. Yes, Oz is apparently lexically scoped.)

All in all, it looks like the CTM book should be quite enjoyable. I’ve heard it’s readable and its coverage of different programming paradigms — object-oriented, concurrent, logic, functional, imperative, constraint-based, declarative — is nearly comprehensive.

Let the holiday language snobbery commence!

July 21, 2007

Will there even be a next big language?

Filed under: Language snobbery — metacircular @ 12:54 pm

The ongoing discussion about Javascript as the “next big language” seems to assume that there will definitely be a next big language and it is simply a matter of clairvoyantly predicting which will be the one you should immediately begin placing all your eggs into.

Steve Yegge has arbitrarily, matter-of-factly hypothesized ECMAScript to be the chosen one without much justification. Others are gambling on Ruby. Meanwhile, Microsoft, the lumbering giant that no longer scares the shit out of people, is borrowing some features from the ML family for the next release of C#; it is definitely staying well within the boundaries of strong, static typing. The Java community has realized the folly of overly complex infrastructure like EJB2 and now are happily zooming along with their outstanding IDEs and XML-addicted frameworks; the smarter elements of them are looking for something beyond Java, preferably one that doesn’t involve abandoning the JVM altogether, like JRuby. There’s still so much informational asymmetry and inefficiency in how technologies are chosen and used that Java, C#, Ruby, and PHP aren’t leaving the scene anytime soon.

Doesn’t the lack of clear consensus here indicate that there might not even be a single winner to arise from all this? Even within individual communities, fragmentation is occurring. There’s already multiple Ruby implementations with more on the way. Ruby may fragment into 2.0 and pre-2.0 groups when the time comes. There is no clear winner for how to do object-relational mapping in .NET. Framework proliferation continues in Java, even for specific parts of the development stack; do you know how many Java template/view layer frameworks there are, not even counting the more popular ones like Tapestry, Velocity, and Wicket?

This along with the interest in domain specific language construction seems to clearly indicate that there will not be a single leading language that gains mass adoption.

Maybe I’m misunderstanding what is implied by “Next Big Language”, indicating that may be something wrong with the terms of discussion: do we even know what we’re speculating on?

Therefore, speculating about what will happen in the next few years (a futile exercise I try to resist, even though I’ve engaged in it several times in this post) should not be predicated upon an assumption that we will all gravitate towards one language like insects drawn to the light, especially when that once and future language might not even exist yet.

But, feel free to arbitrarily declare that your language of choice (Scala, Ruby, JavaScript, Erlang, …) is “the winner.”

Blog at WordPress.com.