On May 12, 2011, at 3:53 PM, Ken Wesson wrote:

> On Thu, May 12, 2011 at 6:44 AM, Juha Arpiainen <jarpi...@gmail.com> wrote:
>> On May 12, 1:18 pm, Ken Wesson <kwess...@gmail.com> wrote:
>>> This reads to me
>>> as implying that hinting (defn ^String foo [] ...) is hinting that foo
>>> references a String rather than an IFn that returns a String
>> 
>> It is if you use 'foo in argument position. That is, if Foo/bar is
>> overloaded for String and IFn, then (Foo/bar foo) resolves to the
>> wrong version.
> 
> MORE type hinting inconsistencies, then.
> 
> There does seem to be something of a mess in this area, in need of
> cleaning up before 1.3 goes stable.

Object-based hints are not new, and haven't changed in 1.3.0 as far as I can 
tell.  Such hints are _hints_, not type declarations (in the case of a var's 
value) or return type declarations (in the case of a fn held by a var).  This 
is distinct from primitive "hints", which — in the context we've been 
discussing them — _are_ return type declarations (i.e. they change the type of 
the return from the function's generated class).

- Chas

-- 
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

Reply via email to