Fair enough, but in this case types wouldn't really have helped: the author did use `Double` type hints, mistakenly assuming that would make its code use primitive types, which it does not since `Double` is boxed and not primitive. Clojure already has compile time warnings about boxed math that would've helped in this case if turned on, without any need for types: try compiling OP's code after running `(set! *unchecked-math* :warn-on-boxed)`
> On 12 May 2016, at 23:05, Raoul Duke <rao...@gmail.com> wrote: > > On Thu, May 12, 2016 at 2:59 PM, Nicola Mometto <brobro...@gmail.com> wrote: >> Static types wouln't have helped at all in this case. Types are about >> correctness, not performances. This comment was needless > > Here I thought maybe knowing when something was or was not something > could have been useful in, you know, making the code (benchmarks in > this case) actually do what the author wanted it to be doing. Silly > me. > > I will always have my fingers crossed for core.typed. :-) > > -- > 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 > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: Message signed with OpenPGP using GPGMail