Re: Type hints for clojure.set functions

2013-09-30 Thread splondike
notice that there's a very successful crowdsource fund going toward core.typed <http://www.indiegogo.com/projects/typed-clojure>, perhaps this static checker will be a reality this time next year. On Monday, September 30, 2013 5:55:01 PM UTC-4, stuart....@gmail.com wrote: > > Hi splondik

Re: Type hints for clojure.set functions

2013-09-30 Thread splondike
Thanks for the comment. The current behaviour is sensible for the code branch where the second argument is the same length or shorter than the first (see my first post). It is the other branch that does not do what you would expect. My real issue though is how the behaviour changes dramatically

Re: Type hints for clojure.set functions

2013-09-29 Thread splondike
Idiomatic was probably the wrong word since we don't want to arbitrarily restrict options in a dynamic language. In this case where the results are unexpected and inconsistent in other cases, would this check be acceptable? On Sunday, September 29, 2013 1:55:05 PM UTC-4, splondike

Re: Type hints for clojure.set functions

2013-09-29 Thread splondike
ime per run). Would this approach (probably with some more rigorous performance profiling) be something likely to be included in the language, is it idiomatic? On Saturday, September 28, 2013 4:01:10 PM UTC-4, John Hume wrote: > > On Sep 28, 2013 1:47 PM, "splondike" > >

Type hints for clojure.set functions

2013-09-28 Thread splondike
I just got burned by the clojure.set/difference function (v 1.5.1) wherein I had in error passed a vector for the second argument. This causes inconsistent results depending on the relative lengths of the arguments. That is, as soon as the second argument becomes longer than the first we get a