gen-class and need for fully qualified class names
46 views
Skip to first unread message
Jon Seltzer
unread,
Sep 30, 2021, 6:55:20 PM9/30/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to clo...@googlegroups.com
Hi all,
I'm sure this is answered somewhere already but can't find it. The :gen-class option of ns macro has access to imports. Why is it that fully qualified class names are still required?
Elias Zaretsky
unread,
Oct 1, 2021, 8:42:09 AM10/1/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Clojure
Jon,
The ns macro is expanded such that the (gen-class) form appears before any (import) calls. So unqualified names are not available yet. There are more details in this StackOverflow answer I posted a while back.