Hi,

On Mar 8, 10:23 pm, CuppoJava <patrickli_2...@hotmail.com> wrote:

> And yet, the writer of the library shouldn't have to be aware that the
> user *might* bind fast-println to println.
> And the user of the library shouldn't have to be aware of the
> implementation details of fast-println to want to bind println.

Maybe this is just bad design? There was a thread about monkey
patching. Using a different binding for println is just that. And as
you see it introduces the same problems as it does in other languages.
As a library developer I would care a **** what a user might want to
rebind. If I did, I would not be allowed to trust a single Var. Please
don't let us enter this SPAM country. Vars which are intended to be
rebound should be clearly labeled so - in the docstring and possibly
with *earmuffs*.

If I intend to design my fast-println so, that it can be used as a
replacement of sorts of the usual println, I can protect against such
a problems with the mentioned let. But then my println's don't compose
anymore...

(binding [println fast-println]
  ...
  (binding [println fancy-println]
    ...)
  ...)

I'm not sure it is worth to tinker with core functions. At least not
in such a simple way.

Sincerely
Meikel

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