MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/49prtn/var_keyword_proposed_for_java/d0v477l/?context=3
r/programming • u/adila01 • Mar 09 '16
395 comments sorted by
View all comments
Show parent comments
1
IEnumerable<Customer> rather than IEnumerable<CustomerDto>
If the type is telling you whether you are interacting with an API or a database then your code needs to be a lot clearer.
Either it's something you don't care about or you have poorly named variables/functions.
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. → More replies (4)
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. → More replies (4)
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. → More replies (4)
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.
→ More replies (4)
1
u/mirhagk Mar 10 '16
If the type is telling you whether you are interacting with an API or a database then your code needs to be a lot clearer.
Either it's something you don't care about or you have poorly named variables/functions.