Thank you for this, you just fixed a bug for me :-)

I was trying to do some tricky type hinting with definline using amolloy's
great answer <http://stackoverflow.com/a/11920022> on StackOverflow. Notice
that he uses `BufferedImage and not 'BufferedImage. I stupidly figured that
this was just a typo due to force of habit or similar and switched to using
quote, and discovered that I had problems when BufferedImage wasn't
imported when the inlined version of the function was called. Turns out
that ` expands an imported class name to the fully qualified name, whereas
' does not.

(import java.awt.image.BufferedImage)
=> #=java.awt.image.BufferedImage
`BufferedImage
=> java.awt.image.BufferedImage
'BufferedImage
=> BufferedImage

Mea culpa. I'm not sure I would ever have made this connection, very timely
- thank you.

Cheers,
Colin


On 19 June 2013 20:46, Phillip Lord <phillip.l...@newcastle.ac.uk> wrote:

>
>
>
> So, I was thinking that ' and ` were basically the same, unless a ~ was
> involved somewhere. But I have discovered this.
>
>
>
> (ns john)
>
> (println '(paul))
> (println `(paul))
>
>
> ;;=>
> (paul)
> (john/paul)
>
> With the ' paul is not namespace qualified, while with the ` paul is.
>
>
> Turns out to be a bit of a pain, actually, although I have worked around
> it. But mostly I am surprised. Is this expected?
>
> Phil
>
> --
> --
> 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.
>
>
>

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