One place where interop needs improvement: imports.

This is ridiculous:

#<CompilerException java.lang.ClassNotFoundException: java.awt
(NO_SOURCE_FILE:0)>
sandbox=>
#<CompilerException java.lang.ClassCastException:
clojure.lang.LazilyPersistentVector cannot be cast to clojure.lang.Symbol
(NO_SOURCE_FILE:0)>
sandbox=>
#<CompilerException java.lang.ClassNotFoundException: java.awt
(NO_SOURCE_FILE:0)>
sandbox=>
#<CompilerException java.lang.ClassNotFoundException:
java.awt.ActionListener (NO_SOURCE_FILE:0)>
sandbox=>
#<CompilerException java.lang.ClassNotFoundException:
javax.swing.BorderLayout (NO_SOURCE_FILE:0)>
sandbox=>

I shouldn't have to play guessing games or keep reaching for reference
materials. We need at least two improvements here.

1: Improvements to the ns macro, such as described in a previous thread.
Particularly I'd like to see

(:import package class class class)

work. This fits with normal Clojure syntax. Right now it wants an extra pair
of parentheses, does not accept a vector(!), and provides a very unhelpful
error message.


2: IDE support. We need something like Eclipse's "organize imports" that
works for Clojure code. You type (:import class class class) and hit
control-magic, it figures out what packages for you, and prompts if there's
any ambiguity, turning it into a bunch of (:import package class class)
lines (as per 1 above) for each package. Substitute appropriate key for
"magic".

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