This behavior is by design. 

(1) The absence of warning is consistent with proxy, reify, etc. You specify as 
much as you want, and there is no warning. This is very unlikely to change!

(2) The dynamism implied by a hypothetical "append-partial-protocol" seems high 
on complexity and low on value. But since it came up, maybe I'm wrong. Real 
motivating examples always welcome.

Stu

> It's better to illustrate this with simple example:
> 
> If I'll define following protocol:
> 
> (defprotocol test1
>  (a1 [this] "a1")
>  (a2 [this] "a2")
>  (a3 [this] "a3")
>  )
> 
> and then I can extend it with following constuction:
> 
> (extend-protocol test1 String
>                 (a1 [this] (str "Hello1 " this "!")))
> 
> then I get no warning, that protocol test1 has 3 methods, and if I'll try
> to call corresponding, not defined methods, then I'll get
> 
> (a2 "bbb") --> method not defined
> 
> and if I'll try to extend it further with following call
> 
> (extend-protocol test1 String
>                 (a2 [this] (str "Hello1 " this "!")))
> 
> then a2 will defined, but a1 become undefined.
> 
> May be we'll need either have a warning, that extend-protocol doesn't
> defines all necessary methods, or we'll need to allow to "append" methods,
> not defined earlier....
> 
> 
> [AvataR]  at "Fri, 16 Jul 2010 16:27:36 +0300" wrote:
> [> I have record J:Bot, protocol P:Bot
> [> and two files, one extend-protocol statement by file.
> [> After loading first file i get:
> [> http://pastebin.com/Kq5GZ6RJ
> [> After loading second file i get:
> [> http://pastebin.com/Pu3kHZ1h
> 
> [> Looks like next extend-protocol rewrite :impls seg. How/where post the
> [> bug?
> 
> [> Or myabe this is a feature? :]
> 
> 
> 
> -- 
> With best wishes, Alex Ott, MBA
> http://alexott.blogspot.com/        http://alexott.net/
> http://alexott-ru.blogspot.com/
> Skype: alex.ott
> 

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