Research ethics

Most of the research we discuss here on lambda is theoretical research, done with mathematical tools. But what about research about actual language use, those "human factors" we are so fond of discussing?

Research of the latter kind requires empirical data, the gathering of which, as Ralph Johnson discusses here, may pose ethical problems.

For what it's worth, I agree with Ralph that this is an "idiotic opinion," but it's an issue that might cause problems for some of the grad students reading LtU.

Not really related to this is the fact that doing meaningful research of the kind I am alluding to here is pretty darn hard, in fact quite close to being impossible.


An open standards process for Common LISP was announced a couple of weeks ago at the Amsterdam LISP meeting, the ALU CLRFI standards process, apparently modelled on the Scheme SRFI. So far only one standard has been submitted, a features testing standard.

Open standards processes such as the CLRFI have the potential to be of general value to people interested in language design issues, since they can bring out a great deal of tacit wisdom about language and library features that is otherwise difficult to get hold of.

Curently there is not much information about the whys and whats of the CLRFI process, though Kent Pitman has argued for some time that Common LISP needs a SRFI-like program. More information awaits a hungry audience!

Templates vs. Generics

Bruce Eckel gives his take on C++ Templates vs. Java Generics, using the example of an apply() function that will apply any method to every object in a sequence:

What I found in modifying this example and translating it to Java was surprising. As far as generics go, it does in fact support my thesis that erasure emasculates generics. What is surprising is that ... the Java code is small and elegant, and far less verbose than the C++ code,... Alas, generics had nothing to do with this succinctness – it was actually reflection and varargs that were responsible. And so the power of reflection continues to be one of the most interesting features of Java, even though its runtime uncertainty is at odds with the Java Generics goal of eliminating ClassCastExceptions.
I figure the goal is for the compiler to proof the type correctness, but he's right in that RTTI is at odd with that goal.
(Also of interest, is the link to the Java Generics FAQ).

[Edit Note: The URLs should be working again]

Ken Shan: Shift to Control

Ken Shan's Shift to Control (slides) presented at the recent Scheme workshop.

Ken shows that shift/reset, prompt/control, prompt/cupto and lots of other delimited continuation operators are all equally expressible, and all can be modeled by ordinary CPS.

The paper shows that shift and reset can macro-express control and prompt, as well as the other operators, without capturing undelimited continuations or keeping mutable state. This translation is previously unknown in the literature.

Good stuff! But keep in mind that, as the cartoon in the slide says, control operators can make your head hurt...

JBoss Aspect Oriented Programming

I don't remember a discussion here about JBoss's use of AOP.

This is somewhat related to J2SE 5.0, mentioned yesterday, specifically JSR-175, being based on metadata annotations.

Two related papers are Aspectizing Server-Side Distribution (ASE 2003) and The JBoss Extensible Server (Middleware 2003) [both PDFs].

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...