Re: How to hide data representation with keywords for deftype accessor?

2010-04-11 Thread Konrad Hinsen
Sophie a écrit : (deftype A [x]) gives me an accessor (:x anA) Then I decide to change data representation of A without impacting client code, but I don't seem able to define a function (defn :x [anA] ...) Should I be doing something different? (:x anA) is not a special accessor function,

Re: How to hide data representation with keywords for deftype accessor?

2010-04-11 Thread B Smith-Mannschott
On Sun, Apr 11, 2010 at 06:39, Sophie itsme...@hotmail.com wrote: (deftype A [x]) gives me an accessor (:x anA) Then I decide to change data representation of A without impacting client code, but I don't seem able to define a function (defn :x [anA] ...) Should I be doing something

Re: How to hide data representation with keywords for deftype accessor?

2010-04-11 Thread Laurent PETIT
I would like to add another idea right out of my head: When you say you want to hide from client code, juxtaposed to the notion of (def)type, a little warning manifests itself in my head, because as far as I understand them, types are there to provide polymorphic implementations for protocols. So

How to hide data representation with keywords for deftype accessor?

2010-04-10 Thread Sophie
(deftype A [x]) gives me an accessor (:x anA) Then I decide to change data representation of A without impacting client code, but I don't seem able to define a function (defn :x [anA] ...) Should I be doing something different? Thanks! -- You received this message because you are subscribed