On May 17, 2:24 pm, Mark Engelberg <mark.engelb...@gmail.com> wrote:
> Thanks for your questions.  I'll try to explain better.

I'm still not quite clear on exactly what you're trying to accomplish.
You showed how to accomplish your purpose in Clojure, but then
suggested that the result was not 'clean'. It's not quite clear what
you mean by 'clean'--that is, what features of the solution you
presented do you want to change?

Let me take a wild stab at enumerating your requirements, and you can
tell me where I got them wrong.

1. You want a set of named values, each defined once per 'module'.

2. You want code from two or more 'modules' to run in the same
session, and for each 'module' to see its own definitions for the
named values.

3. You don't want to pass the values or names as parameters to
functions in a 'module'.

Is that right? Perhaps not, because if it were, then this should do
the trick:

(ns 'gravity1)
(def *gravity* 1.0)

(ns 'gravity2)
(def *gravity* 2.0)

user> gravity1/*gravity*
1.0
user> gravity2/*gravity*
2.0

What is it that you want to do that this solution doesn't accomplish?

--~--~---------~--~----~------------~-------~--~----~
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