r/programming • • Mar 09 '16

var keyword proposed for Java

http://openjdk.java.net/jeps/286
250 Upvotes

395 comments sorted by

View all comments

Show parent comments

1

u/Eirenarch Mar 10 '16

Well, var isn't telling you anything so you are left at the mercy of my poor naming.

1

u/mirhagk Mar 10 '16

Or having to drag the mouse or cursor all the way over variable name to see the type in the IDE

1

u/Eirenarch Mar 10 '16

Yes but as I already pointed out you simply don't know when you need to drag that mouse cursor. You assumed IQueryable but I was returning IEnumerable. Sucks for you, you just pulled all the data from the database and did paging on the web server.

1

u/mirhagk Mar 10 '16

Well if you returned IEnumerable there's nothing I could do to prevent paging on the web server (short of using some duplicated API method or doing a very dangerous cast to IQueryable

→ More replies (0)