I think you Timo ask here a very interesting and important question.

It's not just about having encapsulation or not. It's really about designing
the code so that the library internals can evolve without impact on the user
part.

Given that no "here is the standard clojure way" was called :

 * either it is too early in the day, and the answer will come in a few
hours
 * either it is not neither in core nor contrib, and it could reveal that
not so much clojure users have this need ? ! Maybe clojure is not yet used
in the kind of application where the definition of the datastructures and
hierarchies is used by other teams. But still it seems odd to me, because
even in my own code, I would like to separate different parts for easing
maintenance ?
 * either there is a totally different way of handling the problem, and
indeed, as in the URL you pointed, you (and I will learn something along the
process) have to think about it differently in clojure.

Looking forward to other's insightfull comments on this,

Regards,

-- 
Laurent

2009/4/20 Timo Mihaljov <noid....@gmail.com>

>
> Matt Clark wrote:
> > Maybe I'm missing something, but what is wrong with Stuart Sierra's
> > solution?  I quite like it, and it would probably be more appealing if
> > it were encapsulated into a macro.
>
> Frankly, it seemed like a good answer to the wrong question [1] instead
> of being a recurring and widely known idiom in the Clojure community.
> Stuart's disclaimer ("I won't claim this is an elegant solution, but
> it's similar in spirit to your Python example") left me feeling that his
> answer was what I asked for, not what I need, if that makes any sense.
>
> To put it another way, any answer involving custom support code (new
> macros or the like) is not the one I'm looking for. Being able to modify
> the language is very cool, but not being able to solve a simple problem
> with a language that thousands of people use all the time suggests to me
> that I'm trying to solve a problem that everyone else sidesteps
> altogether.
>
> Thanks to everyone for your replies. An don't worry, I'll stop with the
> newbie questions someday :)
>
> [1]
>
> http://blogs.msdn.com/ericlippert/archive/2009/04/13/restating-the-problem.aspx
>
> --
> Timo
>
> >
>

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