zhuangxm/clj-rpc — comment on commit 123cda14fe50e3140001e3648ed1186cd547573d
File: src/clj_rpc/wire_format.clj line 22
By robertluo:

The difference is if the keyword has a name space.

(keyword ns s) will return a keyword with name space, while (keyword s) without.

According to clojure derive function, it requires the symbol or keyword is name space qualified. So if one day we need reuse an implementation for different keywords, has a name space qualified keyword will be easier. However, it just bring a little benefit to this scenario.

On 2011-10-28, at 下午12:08, zhuangxm wrote:

> why need (partial keyword "clj-rpc.wire-format") rather than just keyword ?
> is any different from below?
>
> (defmulti serialization
> "Returns a pair of encoder, decoder function."
> keyword)
>
> (defmethod serialization :clj [_]
> [pr-str read-string])
>
> (defmethod serialization :json [_]
> [json/generate-string json/parse-string])
>
> --
> Reply to this email directly or view it on GitHub:
> https://github.com/zhuangxm/clj-rpc/commit/123cda14fe50e3140001e3648ed1186cd547573d#commitcomment-680619