As near as I can tell the protocol type hints are not used in the
resulting Java interface. For example:

(ns demo.impl.boat)

(defprotocol Boat
  (go [boat ^int distance]))

Leads to:

javap -classpath target/classes demo.impl.boat.Boat
public interface demo.impl.boat.Boat{
    public abstract java.lang.Object go(java.lang.Object);
}

The argument that I hinted to be an "int" appears in the interface as
an "Object". This becomes an issue if I try to use the interface for
Java interop (as the definition of an API for Java callers to use).
Currently I am working around this with gen-interface.

Does anyone know if there are long term plans to use the hints to type
the values in the interface? Or maybe I am just doing something wrong?

Thanks.
-David McNeil

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