A Java reference type is basically any type allocated on the heap. The
four Clojure reference types are particular Java reference types. My
complaint is this is exactly the sort of weirdness that causes
learners to scratch their heads. Not the biggest issue, sure, but this
sort of thing is nice to avoid when possible.

While we're at it, aren't "Var" and "Ref" backwards? Currently, Refs
are the things that get mutated in the normal course of a program
while a Var is just a top-level holder which is rarely changed.
Shouldn't the thing which is variable be the "Var" and the
(relatively) fixed thing be the "Ref"? The root problem here, though,
either way, is that "var" vs. "ref" makes a dubious semantic
distinction between already overloaded general-use terms. Sadly, you
see this a lot in naming because good naming is very often /freaking
hard/.

Again, not a big deal by itself, but if you never fix these mistakes,
they just build and build until a whole bunch of names in your system
become impenetrably meaningless to newcomers, like car and cdr, making
the whole system needlessly hard to learn.

I understand, though, that I'm uniquely obsessed with ease of
learning. One thing I find very exciting about Clojure--and something
which very few have noted--is that Clojure is a considerably easier
Lisp to learn: easier than CL, certainly, but also even easier than
Scheme. Hence my introduction: I wanted to distill that simple essence
into something sequentially readable and easily digestible. While the
language is still open for amendment, I hope Clojure takes some
measures to preserve and optimize ease of learning. Ease of learning
is a big part of what will give Clojure a chance that other Lisps
never had to see wide adoption.

On Dec 10, 12:03 pm, "J. McConnell" <[EMAIL PROTECTED]> wrote:
> On Wed, Dec 10, 2008 at 1:27 PM, Brian W <[EMAIL PROTECTED]> wrote:
>
> > Another issue I had is we don't have a good blanket term for Vars,
> > Refs, Agents, and Atoms. Rich sometimes calls them "reference types",
> > but that term already has a different meaning in Java. I considered
> > "meta-references", but then I realized that, say, the symbol pointing
> > to a Var is a meta-reference---a reference pointing to a reference---
> > not the Var itself. I've settled for now on "reference object" and
> > "reference object type", but these are confusingly close to "reference
> > type".
>
> I would say to stick with "reference types" and just explain what is
> meant by the term. I have a feeling that introducing new, undefined
> terms will just confuse things more. In fact, it seems to me that both
> Java and Clojure have a pretty similar definition for the term. More
> or less, a reference type is a type whose value is a reference to a
> data structure on the heap. I think that by taking a sentence or two
> to point out the similarities and differences between the ways Java
> and Clojure use the term, any confusion will be greatly reduced.
>
> Regards,
>
> - J.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to