Thanks for the points. What I was thinking, was that for things like π, in Clojure (as in CL), perhaps it makes to sense to mark it like so:
+pi+ On Sat, Feb 21, 2009 at 8:59 PM, Chouser <chou...@gmail.com> wrote: > > On Sat, Feb 21, 2009 at 5:36 PM, David Nolen <dnolen.li...@gmail.com> > wrote: > > My point is simply that whether something is immutable or not has nothing > to > > do with how that data structure is being used in the program. > > Naming conventions signify usage. You could write a pure Java > > program and make it pretty darn functional. You would still want to > > mark values that are logically treated as constants as such. > > Most named Vars are given a single value and this is never changed at > all. They are created with 'def' or some variation thereof, and then > examined in various ways, but not given new values. They are constant > and they are named in the normal Clojure way: lowercase with dashes. > > Sometimes these Vars are changed later with another 'def', but this is > meant to be a development or debugging technique, not something that > should be incorporated into normal program logic. Anticipating this > kind of change (or not) shouldn't influence the name of the Var. > > Some named Vars are expected to be given a thread-local value with > 'binding', and in even more rare cases then adjusted using 'set!'. > This usage is unusual enough that the names of such Vars warrant the > *earmuffs*. > > Even less commonly than any of the above is changing a Var's root > value with 'alter-var-root'. This is perhaps unusual enough that it > warrants a naming convention to indicate that this particular Var will > actually be non-constant at its root. > > Is there some other distinction that needs to be made? Does logically > constant mean something different from what I've described above? > > --Chouser > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---