Re: Variables and closures (Was: Objects and Relations)

From: Chris Smith <cdsmith_at_twu.net>
Date: Sat, 10 Feb 2007 13:47:56 -0700
Message-ID: <MPG.2037dd657b18a74a9897f0_at_news.altopia.net>


Marshall <marshall.spight_at_gmail.com> wrote:
> However, in this case I see an actual benefit (I almost said
> "value" ha ha) to making explicit the fact that objects are
> a kind of first class variable. It makes the significance of
> various language design choices more apparent.

Sure. If you're trying to get across something more fundamental than whether "variable" should mean one thing or another, then that's worth discussing. It sounds like that's going on, although I've yet to hunt down what you mean by "first-class variable" in this context.

I was responding more to the other conversation going on beside your point. That one can, I think, be fairly summed up as:

DavidBL: "Ha ha! He said variable instead of object! Idiot." Bob: "There's only one true 'variable'! Self-aggrandizing ignorant."

That's what I objected to.

[...]

> Amusingly, whereas I once felt that Dale's excellent point
> argued strongly against closures, I now feel that that point
> argues strongly against objects and in favor of closures.

I feel that Dale's point is just wrong. Clearly, contrary to what was stated there, objects and function closures are equally capable of expressing the same sets of abstractions. The only difference is one of terminology and syntax, which seems like a poor place to draw the battle lines.

> It may also be timely to note that Neal Gafter is circulating
> a proposal to add closures to Java.

Neal... he works for you guys now, right? I've been waiting for someone to add closures to Java ever since Java 1.1 stuck its fingers in its ears and loudly screamed "we don't like closures" with that silly 'final' requirement for local and anonymous classes. Is Neal's proposal to add first-class functions as well, or just closures?

-- 
Chris Smith
Received on Sat Feb 10 2007 - 21:47:56 CET

Original text of this message