On Apr 20, 12:32 pm, Laurent PETIT <laurent.pe...@gmail.com> wrote:
> 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.

In general, Lisp-derived languages don't try to enforce good
programming.  They assume that programmers are smart.  You're on your
own, even if that means shooting yourself in the foot.

If you know that your library needs to accommodate changing
implementations without breaking the API, then you need to factor that
into your design, by using accessor functions, macros, or some other
technique.

True, you cannot prevent someone from manipulating the implementation
directly.  Bullet, meet foot.  You just have to take it on faith that
your users are smart enough not to do that.  If they're programming in
Lisp, then they probably are.

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