MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/java/comments/49prnu/var_keyword_proposed_for_java/d0u1fxc
r/java • u/adila01 • Mar 09 '16
312 comments sorted by
View all comments
Show parent comments
1
Oh, so there's tools to retype var keywords into keywords that actually describe the data type?
3 u/lelarentaka Mar 10 '16 Not yet obviously, but the same static analyser that puts wiggly red line under "String s = new ArrayList()" can absolutely do what you want there. 3 u/OHotDawnThisIsMyJawn Mar 10 '16 If you decide you don't want var in your project then add it to your style checker and auto reject commits that use it 1 u/marc2912 Mar 10 '16 Like I mentioned elsewhere we don't just work with our code. The whole point is consistency. 1 u/[deleted] Mar 10 '16 [removed] — view removed comment 3 u/mbuhot Mar 10 '16 Pretty sure reshaper code cleanup can be configured to allow var only on the left of a '= new ...' expression. But every code base I worked on in C# 3+ was vars everywhere.
3
Not yet obviously, but the same static analyser that puts wiggly red line under "String s = new ArrayList()" can absolutely do what you want there.
If you decide you don't want var in your project then add it to your style checker and auto reject commits that use it
1 u/marc2912 Mar 10 '16 Like I mentioned elsewhere we don't just work with our code. The whole point is consistency.
Like I mentioned elsewhere we don't just work with our code. The whole point is consistency.
[removed] — view removed comment
3 u/mbuhot Mar 10 '16 Pretty sure reshaper code cleanup can be configured to allow var only on the left of a '= new ...' expression. But every code base I worked on in C# 3+ was vars everywhere.
Pretty sure reshaper code cleanup can be configured to allow var only on the left of a '= new ...' expression. But every code base I worked on in C# 3+ was vars everywhere.
1
u/kyle2143 Mar 09 '16
Oh, so there's tools to retype var keywords into keywords that actually describe the data type?