Re: coercion automatically calling a user defined coercion multimethod in case of type mismatch with arguments passed to a type hinted function..

2010-11-29 Thread Sunil S Nandihalli
Thanks Stuart. You are probably right. But may be there can be a modified defn-auto-coerce .. Thats just a thought .. May be I will try to implement it . .but would love to hear any pointers you may have in that direction before I go it myself.. I am still an ametuer when it comes to Clojure .. so

Re: coercion automatically calling a user defined coercion multimethod in case of type mismatch with arguments passed to a type hinted function..

2010-11-29 Thread Stuart Sierra
Hi Sunil, This is one of those things that seems really useful for development, but ends up being a lot of trouble down the road. For one thing, it's hard to make it perform well. For another, it can lead to unexpected results when you add in inheritance hierarchies and overloaded methods. -S

coercion automatically calling a user defined coercion multimethod in case of type mismatch with arguments passed to a type hinted function..

2010-11-29 Thread Sunil S Nandihalli
Hello everybody, I was just wondering if we could have functions automatically call a multimethod whose dispatch-value would be a vector typename of the current argument and required argument type. and accept the return value of that function as the argument in place of the current argument. I kno