nchurch <nchubr...@gmail.com> writes:

> You're quite correct that the namespace \mechanism as it stands would
> not work for this----good point.  I guess I am just suggesting using
> the \syntax to do something let-like.  Perhaps it would be better to
> make up a completely different syntax.
>
> As for your example, I'm still not sure we understand each other:
>
> (let [x (foo 17), dx foo/double-x]
>     (do-something-with x dx))
>
> Yes, that is how it would \look (I've dropped the user. as it isn't
> needed here).  But why is the \name user.foo/double-x changing?

Because the developer of the library refactored the foo function and
thereby changed the local double-x to double-value.  Library developers
usually refrain from renaming functions, but the internals of a function
itself shouldn't be of any interest to users.

> At any rate, it would be better to describe these as names within a
> function execution's \scope, not a function \namespace.  Hopefully
> that is less confusing.
>
> As for storing values: as I said they should be \function-local, so
> that in
>
> (defn bar [...]
>    (foo ...)                   ;; 1
     (bar ...)                   ;; 2
>    (+ foo/double-x ...)
> )
>
> foo/double-x expires after bar returns.

What if bar is recursive like above.  What's the value of foo/double-x
in that case?  The value of the call in line 1, or the value from the
last foo in the recursive call in 2?

I think, I'll stop here.  You won't convince me that this approach is
practicable anytime soon. ;-)

Bye,
Tassilo

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
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