There's no way to check types at compile time? (defn len2 [#^String x] (. x (length)))
(defn wrong [] (len2 10)) Would be good if you could find such errors at compile time. Optional static typing =) Regards. Islon On 12 nov, 21:43, Rich Hickey <[EMAIL PROTECTED]> wrote: > On Nov 12, 7:21 pm, samppi <[EMAIL PROTECTED]> wrote: > > > Ah, yes. I meant, what are these hints? What does the compiler change? > > Is it some sort of informal type enforcement or something? > > The hints are described here: > > http://clojure.org/java_interop#typehints > > It is strictly a performance optimization so calls to Java can avoid > reflection. There is no compile-time enforcement. > > Rich --~--~---------~--~----~------------~-------~--~----~ 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 To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---