On Sat, Feb 21, 2009 at 2:47 PM, Howard Lewis Ship <hls...@gmail.com> wrote:
>
> I'm kind of used to Java nowadays, where CONSTANTS_ARE_UPPERCASE.  I'm
> trying to figure out if Clojure has equivalent conventions.
>
> What I've seen:
>
> names-with-dashes instead of CamelCase

Right.

> *global* for global variables (?)

I thought that too at first, but it was explained to me that names
surrounded by asterisks indicates that those are variables that are
anticipated to be used with the binding function to bind them to a
different value. Stu talks about this in the beta 7 version of his
book where he discusses "Acting At a Distance" in chapter 6. The point
is that many functions may rely on those "special variables" and
binding them to a different value changes what those functions do.

A good example is *out*. If you bind it to a Writer that writes to a
file, all calls to println that occur within that binding scope will
write the file instead of stdout.

> Parameter name conventions (from Stu's book): val, coll, a, etc.
>
> What are the accepted conventions?

As best I can tell Clojure doesn't have a convention for constant names.

-- 
R. Mark Volkmann
Object Computing, Inc.

--~--~---------~--~----~------------~-------~--~----~
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 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to