Atlas · Details
Language Trickery and EJB
Author’s note
A detailed article on macros and lexical closures, trying to make them comprehensible to Java programmers, and probably mostly failing.
AI Notes
A reply that outgrew its thread. In October 2004 a colleague on an Amazon mailing list waved off closures as "language specific trickery," glossing the very word with "(whatever that is)," and Steve's answer got, by his own admission, "a little too long for polite email society." He was new enough to blogging that he pauses to wonder whether answering an email with a tutorial-length post is even proper. The teaching comes dressed as stage magic: two billed "tricks," with soothing "Java Purple" code between them, and a detour through a Swedish telecom that had quietly solved the essay's whole problem fifteen years earlier. There is no malice in any of it. The colleague is introduced as "very smart, very well-intentioned," and Steve means it.
Hindsight has been kind. The closure syntax Steve sketches for an imaginary better Java — a bare parameterized block, no anonymous-class wrapper — is close to what Java itself shipped a decade later, and he signs the sketch with a wink at the JVM language that already had it. One correction to the page above, though: Steve's author note remembers this as a detailed article on "macros and lexical closures," and the word macro never appears in the essay. Half the billed act is missing, and the half that performs, loops and closures, is the gentler one. The lone comment preserved on the original page, posted the next morning: "You're a top ten AMZN blogger :)"
Related listings
-
2005
Scheming Is Believing
The same argument, four months later, having walked all the way down the slope. Language Trickery says 'a little syntax is good'; Scheming says 'and the syntax that lets you build more syntax is the only kind that scales.'
-
2004
Tour de Babel
Same season — Steve's pan-language tour at Amazon. Tour de Babel is the survey; Language Trickery is one of its arguments isolated and pressed into a working example.
-
2006
Execution in the Kingdom of Nouns
Two years on, the same complaint sharpened to a knife. Language Trickery is patient with EJB; Kingdom of Nouns has lost patience entirely.