Yes, I agree.

Thanks for helping me to clarify my thoughts on this.

On Thursday, 11 April 2013 02:40:23 UTC+1, Cedric Greevey wrote:
>
> Let me clarify. If the library's designed to interoperate specifically 
> with a particular record type, it should be designed with knowledge of the 
> base keys. Even then, its own keys should be ns-qualified. And it can't 
> assume the set of base keys won't grow in a future version of the record 
> type. But it might conceivably use base keys to do things that are specific 
> to that record type, e.g.:
>
> (defn fancy-third-party-transform [point]
>   (Point. (funky-fn-x (:x point) (:y point)) (funky-fn-y (:x point) (:y 
> point))))
>
> If the library's designed to interoperate with generic maps of outside 
> origin, it can't assume anything about how those maps might be used with 
> regard to keys outside of its own namespace. Non-caller-supplied keys 
> should be qualified.
>
>
>
> On Wed, Apr 10, 2013 at 4:24 PM, Simon Katz <nomi...@gmail.com<javascript:>
> > wrote:
>
>> On Wednesday, 10 April 2013 21:08:22 UTC+1, Cedric Greevey wrote:
>>
>>> If a third-party library is storing things in your defrecord, it 
>>> behooves its author to know what that record's predefined keys are.
>>>
>>
>> Um, I don't think I agree. The library might be doing something very 
>> generic and have no reason to know anything about the defrecord.
>>  
>>
>>> In fact, if a third-party library is putting (its own, rather than 
>>> caller-supplied) keys into caller-supplied maps, it behooves it to use 
>>> qualified keys. :)
>>>
>>
>> Yes.  I can imagine libraries that don't do this, though, and it might 
>> not be obvious that's the case without inspecting a library very carefully.
>>
>> -- 
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com<javascript:>
>> Note that posts from new members are moderated - please be patient with 
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+u...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to