Love in Any Language, Take 2

April 6, 2008

Still at NFJS, and even when I go home, I keep thinking about Neal Ford’s keynote that I railed about a couple of days ago. So maybe complexity, or at least complexity that is not related to problems we’re trying to solve (”ceremonial” complexity, as Neal calls it), isn’t costing us jobs. But is it costing us sleep? nerves? I don’t think I, or anyone else, could disagree that “ceremonial complexity” is the enemy… and then I think back to another talk by Neal Ford during the conference, and his mention that the “new languages” are not about static typing vs. dynamic typing… it’s “ceremony vs. essence”. Neal uses Scala as an example (one that is, sadly, unfamiliar to me) of a static language that provides power without ceremony. This I can live with - static typing isn’t the enemy. Ceremonial complexity is.

So the question is, do we need to brush aside static typing, simply because its greatest harbinger, Java, appears to many to be beyond saving? For me personally, it’s just too great a feature to sacrifice. And more importantly, there’s no need to. There are currently several different proposoals for closures in Java, and reasonable hope to see them someday. C#’s delegates already offer something in that spirit, albeit in a slightly more verbose incarnation. C# 3.0’s lambda expressions go a long way in trimming the fat.

There are other features of C# that resemble those of popular dynamic languages. C# 3.0’s extension methods let you add methods to existing classes, even if they’re final. C# good old features, such as indexers and property go a long way in making the language less like Java and more like Groovy. But there is still more that can be done. Why not add a compiler trick where invocation of an unexistant method will call MethodMissing(string invokedMethodName, object[] arguments)… Have MethodMissing be an event on System.Object - if there’s a handler for it, with the above signature, use it! If not, puke! Let the user choose whether to puke at compile time or at runtime with a compiler switch.

There are probably holes somewhere in the preceding paragraph - I’m designing out of my a** here. But my point is, we should not give up on static languages… I know, I won’t. Having gone from Java to C#, I have seen how much can be accomplished if the driving force behind the language isn’t mired in bureaucracy.

There is probably more ranting on “ceremonial complexity” left to be done, an inquiry into how the hunt for flexibility can bring about bloat (see WebSphere) or freedom (see any language with closures). The important thing for now is that, having found a common enemy, dynamic people and static people can at last be friends.

Entry Filed under: Groovy, Java, NFJS, programming languages. Tags: , .

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Welcome!

My name is Yev Bronshteyn, and you have reached the online repository of my tirades on the world of software engineering and perhaps that other world as well (I've never seen it, but heard it exists). Please leave comments - they make me feel warm and fuzzy inside... Peace!


Add to Technorati Favorites

Categories

Recent Posts

Feeds

Links