使用deffilterop和钱包clojure函数是否有区别、性能或其他方面?
http://nathanmarz.com/blog/introducing-cascalog-a-clojure-based-query-language-for-hado.html提到,可以使用clojure函数(<?age1 2?age1 1)来进行过滤,但是看https://github.com/nathanmarz/cascalog/wiki/Guide-to-custom-operations,您似乎可以定义一个类似的函数(deffilterop 2?x)。
所以我的问题是,这两种方法之间有什么区别吗?如果不是,哪一种是首选语法?
注意:看起来所有的defxxxop函数都被反推荐为defxxxfn。https://github.com/nathanmarz/cascalog/blob/develop/cascalog-core/src/clj/cascalog/logic/def.clj#L131
发布于 2013-10-02 14:41:42
结果发现,从性能的角度看,没有什么不同。deffilterop对于参数化函数非常有用。
https://stackoverflow.com/questions/19139468
复制相似问题