Wed, 11 Jan 2006

Java versus C# Delegates

This white paper explains why Java doesn't have C#-style delegates. It should be read with care; the "application footprint" section is pretty bogus, contrasting the existing reality of delegates with a hypothetical (but easily possible) future world where anonymous classes have less metadata.

What I found most interesting about this paper, though, is its bigger mistake. Much of its argument is actually quite reasonable. However, it completely misunderstands the psychology of programming language adoption by developers, and in particular of those developers most likely to imprint on a language and argue (usually inanely) about its details. People in this mode don't want to hear reasons why not, they want notational convenience. I'm there myself when I complain about missing UI interconnects and missing Gnome features... I don't care about the cost, I just want the darn feature.

Usually languages handle this by using their bureaucracy to thwart some kinds of additions -- which is usually a good thing. Java is no exception here, but the situation is somewhat unusual because C# occupies such a similar niche but has a very different design philosophy.

C++/CLI

I read a draft of the proposed ECMA C++/CLI language specification. This thing is so bad that it is hard to know where to start critiquing it. How about, context-sensitive keywords? Or, my personal favorite, keywords with embedded whitespace? This latter is scarily close to Dalibor's joke that some future Java will have keywords in color... "oops, you want the salmon 'if' there".

(This will actually be an important development for two reasons. First it will allow the long-promised but never-quite-actualized crossover between programming and interior decoration. Second, it will give a new and richer meaning to the traditional Emacs haiku:
M-x font-lock-mode:
Your buffers should resemble
Angry fruit salad)

But back to the subject... a language with both templates and generics. Yeah! A language that adds "^" and "%" operators to go alongside "*" and "&"! Rock! This language is like an ordinary programming language that fell into a huge vat at a chemical factory, and emerged as a supervillain. With tentacles, laser beam eyes, and the ability to change sex at will.

Clearly, though, what we really need is Objective C++/CLI. That way we can combine all the bad and overlapping features, all the punctuation, and all the insanity into one nice package. Which we can then detonate.


posted at: 16:54 | path: /software | permanent link to this entry

Interconnections

I saw that a new Chandler release came out, and that reminded me of a missing interconnection.

I read a number of mailing lists via the excellent Gmane news gateway. This is great because I can open a group and reply to a message.

Sometimes, though, I'll run across a posting to some mailing list via the list's online archives. Replying to this is much harder -- really, absurdly hard. Mailing list archives ought to have associated read-only imap servers, so I can drag a URL from Mozilla to my mailer and have it magically start browsing the list in a reply-able way.

I suppose archives could add mailto: links all over. That would work reasonably well for the particular case of replying.


posted at: 12:49 | path: /software | permanent link to this entry