-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eliminate Reflection #23
Comments
All reflection has been eliminated except in three spots where I think the behavior of |
Hi. Should I attempt to solve these in a pull request? s:\workspace2013\seesaw>lein test |
I'd accept a pull request that fixes the warnings in non-test and non-example code. Most of these are tests and examples though. If you do try, note that there are a few places, especially when |
that's good, I'll focus only on the non-examples and non-test ones, => (def ^Integer a 1)
#'seesaw.color/a
=> (java.awt.Color. 0 0 0 a)
#<Color java.awt.Color[r=0,g=0,b=0]>
=> (java.awt.Color. 0 0 0 (or a 0))
Reflection warning, NO_SOURCE_PATH:1 - call to java.awt.Color ctor can't be resolved.
#<Color java.awt.Color[r=0,g=0,b=0]>
=> (java.awt.Color. 0 0 0 (or 1 a))
Reflection warning, NO_SOURCE_PATH:1 - call to java.awt.Color ctor can't be resolved.
#<Color java.awt.Color[r=0,g=0,b=0]>
=> *clojure-version*
{:major 1, :minor 4, :incremental 0, :qualifier nil}
EDIT2: nope I forgot to set! warn => *clojure-version*
{:major 1, :minor 5, :incremental 0, :qualifier "RC16"} => (java.awt.Color. 0 0 ^Integer (or ^Integer a 0) 0)
Reflection warning, NO_SOURCE_PATH:1:1 - call to java.awt.Color ctor can't be resolved.
#<Color java.awt.Color[r=0,g=0,b=1]>
EDIT4: reported it here: https://groups.google.com/d/msg/clojure/o20XK3xcQxw/e3fDsSUa1vYJ |
one question: do you prefer EDIT: I guess there's no need to use import, since I don't plan on using non-fully-qualified names in the code, unless import does anything extra it's simply unneeded in this case and I prefer using f.q.n. for clarity. So no extra imports ;) |
I have tended to just use fully qualified names. I'd rather just type out the full name than fiddle with the |
Seesaw loves reflection at the moment. This will be an ongoing battle, but for performance and good applet support is a worthy goal.
Add type hints to eliminate reflection.
The text was updated successfully, but these errors were encountered: