MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/java/comments/49prnu/var_keyword_proposed_for_java/d0u1j0w/?context=3
r/java • u/adila01 • Mar 09 '16
312 comments sorted by
View all comments
-3
My argument against it is code like this:
var c = Class.forName("com.foo.Bar")
where you don't know the type of 'c' unless you know the type the method returns (which is not obvious by looking at it)
6 u/kritzikratzi Mar 09 '16 that example is explicitly talked about in the jep. → More replies (1)
6
that example is explicitly talked about in the jep.
→ More replies (1)
-3
u/slartybartfast_ Mar 09 '16
My argument against it is code like this:
where you don't know the type of 'c' unless you know the type the method returns (which is not obvious by looking at it)