I’m trying to read Clojure source code.
There is a IFn interface whose declaration is like :
public interface IFn extends Callable, Runnable{
I think Callable is generic. How can IFn know what the type specified here?
Interface Callable<V>
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It can’t. That declaration is basically using the raw type, which is a bad idea. It would be much better to write:
That said – I hadn’t noticed you were talking about Clojure rather than Java. Given that they’re building a bridge between languages, they can do what they want with the type system, to some extent 🙂