It's concise,  and you know the history of clojure,  thank you expert!

在 2013年8月22日星期四UTC+8下午5时01分55秒,Mikera写道:
>
> It's an old style type hint, indicating that the function returns a value 
> of class "Server" (the full Java class name is probably in an :import 
> declaration at the top of the file)
>
> The new style of type hint is just "^Server".
>
> Both forms of type hint still work at present, but you should prefer the 
> new style.
>
> On Thursday, 22 August 2013 16:50:42 UTC+8, ljcp...@gmail.com wrote:
>>
>> Hi,
>>      I read source code about run-jetty,  as such, at 01 line: "(defn 
>> #^Server run-jetty",
>> what's mean "#^Server", could you give a explanation? thank you!
>>
>> 01(defn #^Server run-jetty
>> 02  "Serve the given handler according to the options.
>> 03  Options:
>> 04    :configurator   - A function called with the Server instance.
>> 05    :port
>> 06    :host
>> 07    :join?          - Block the caller: defaults to true.
>> 08    :ssl?           - Use SSL.
>> 09    :ssl-port       - SSL port: defaults to 443, implies :ssl?
>> 10    :keystore
>> 11    :key-password
>> 12    :truststore
>> 13    :trust-password"
>> 14  [handler options]
>> 15  (let [#^Server s (create-server (dissoc options :configurator))]
>> 16    (when-let [configurator (:configurator options)]
>> 17      (configurator s))
>> 18    (doto s
>> 19      (.setHandler (proxy-handler handler))
>> 20      (.start))
>> 21    (when (:join? options true)
>> 22      (.join s))
>> 23    s))
>>
>

-- 
-- 
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/groups/opt_out.

Reply via email to