Generalized ADTs in Haskell

Simon Peyton-Jones, via Haskell-list:

I've finished my first attempt at implementing Generalised Algebraic
Data types in GHC. Ordinary algebraic data types are generalised to
allow you to write an explicit type signature for each constructor; for

     data Term a where
	Lit :: Int -> Term Int
	Succ :: Term Int -> Term Int
	IsZero :: Term Int -> Term Bool	
	If :: Term Bool -> Term a -> Term a -> Term a

Notice that some of these constructors have return types that are not
just "Term a"... that's the whole point! Now you can write typed
evaluator for these terms:

    eval :: Term a -> a
    eval (Lit i)		= i
    eval (Succ t) 	= 1 + eval t
    eval (IsZero i) 	= eval i == 0
    eval (If b e1 e2)	= if eval b then eval e1 else eval e2

This is implementation of the "wobbly types" we've discussed before in GHC, slated for release in version 6.4. Simon also give a pointer to Tim Sheard's site, as he's done a lot of related work. There I found an interesting looking paper on Omega, a language which takes the GADT idea even further.

J2SE 5.0 released

Sun announced the release of the Java 2 Platform Standard Edition 5.0.

Most of the new features that are interesting from a language design perspective were discussed here in the past. These include generics, autoboxing/unboxing, metadata and typesafe enums. We also discussed some of the new libraries and APIs.

I can understand how Gosling is feeling right now: I wouldn't feel comfortable being responsible for a language without generics...

What's next for Java? The new release model is explained here. The general design philosophy here.

Galois: high assurance software

The ICFP 2004 program now links to the invited talks, in particular PowerPoint slides and MP3 audio for John Launchbury's excellent talk on bringing functional programming to the real world at Galois Connections.

Introduction to E4X

Jon Udell posts a nice intro to E4X (running on Rhino).

A series of code snippets gives you a taste of how E4X can be used to manipulate XML.


WikiTalk is the new FlexWiki behavior language. WikiTalk is a simple object-oriented language that advanced users can use to add dynamic behavior to their FlexWiki topics. Additionally, administrators can use WikiTalk to customize the web user-interface for FlexWiki.

A Wiki DSL for FlexWiki (now shared source). What a lovely idea...

But see here for comments from people who are not in love with DSLs as I am...

Java and coolness, a discussion

Jack Shirazi posted this somewhat amusing discussion.

"I guess we just move in very different circles.". Bingo... the people you know and trust think Java is 'cool,' whereas the people I know and trust think its 'uncool.' Therefore, I see people leaving in droves, whereas you see people coming. So the question boils down to, which group is more reliable in making that judgement? Probably neither... but I'm still going to rant a bit more.

I guess this is related to Graham's Hackers meme. It was almost impossible to argue against Java a couple of years ago, now it is 'officially' uncool...

Which goes to show you that language coolness is much more about community and buzzwords than it is about real language features, right?

ACM Queue: Schizoid Classes

Schizoid Classes, Rodney Bates

Smalltalk-80 was an important and enlightening experiment in just how far object-orientation can be taken in a programming language. It is simple, compact, and shows a rare and refreshing integrity of concept. To accomplish its goals, it introduces the idea that the variables of a class can be either class variables or instance variables, and the methods can be either class methods or instance methods. This turns the class into a mixture of two fundamentally different concepts—type and module—with very different semantics. Smalltalk manages to do this relatively cleanly.

Unfortunately, two more recent languages, C++ and Java, have taken this same distinction and turned it into a gratuitous mess.

The author is of the opinion that [t]he best-designed languages give you two abstraction tools—a module and an object type—each of which serves its own purpose reasonably well - I wonder if he is thinking about Smalltalk or about Ada...

Great Works in Programming Languages

A collection organized by Benjamin C. Pierce.

In September, 2004, I posted a query to the Types list asking people to name the five most important papers ever written in the area of programming languages. This page collects the responses I received. (A few are missing because I am still tracking down bibliographic information.)

Seems prime material here for Lambda.

Programming Language Popularity

Mind as well complete the daily trifecta and post the article on Programming Language Popularity. The author combines search, advertizing and job data to try and draw a measurement on various aspects of popularity. Open to criticism, but the results are somewhat non-surprising given the weights applied, and coming up with a truly objective measurement is probably impossible.

In conclusion, if we look at the data available to us, especially as presented in the final, normalized chart below, we can see that there are broad patterns in language usage. Beyond the overall ranking, it is also possible to see whether a language is more used (jobs) or promoted (ads), and also whether it is used for open source projects, where presumably the participants have chosen a language because they feel it is truly the best choice, rather than dictated by management or commercial needs.

Smalltalk 80: Green Book

The text for Smalltalk-80, Bits of History, Words of Advice is now available online. The text documents the development history of the Smalltalk 80 language.

  • Part One of this book is a collection of papers that provide some
    background and history of the Smalltalk-80 implementation.
  • In Part Two we present papers that describe the experiences four
    implementors had in bringing their systems to life.
  • Part Three is a collection of measurements made by the
    implementation groups.
  • In Part Four we present papers that look toward the future of
    Smalltalk systems and propose ideas for extending the Smalltalk-80
    system beyond its initial form.

via Cincom Smalltalk Blogs.