Click here to Skip to main content
15,895,084 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: I think I've just been sent The Pink Panther's "To Do" list. Pin
Marc Clifton25-Oct-16 8:19
mvaMarc Clifton25-Oct-16 8:19 
GeneralRe: I think I've just been sent The Pink Panther's "To Do" list. Pin
OriginalGriff25-Oct-16 8:30
mveOriginalGriff25-Oct-16 8:30 
GeneralRe: I think I've just been sent The Pink Panther's "To Do" list. Pin
Colin Mullikin25-Oct-16 9:03
professionalColin Mullikin25-Oct-16 9:03 
GeneralRe: I think I've just been sent The Pink Panther's "To Do" list. Pin
PIEBALDconsult25-Oct-16 11:43
mvePIEBALDconsult25-Oct-16 11:43 
GeneralAn interesting (or not) thing about C#'s var Pin
Marc Clifton25-Oct-16 7:33
mvaMarc Clifton25-Oct-16 7:33 
GeneralMessage Removed PinPopular
25-Oct-16 8:03
professionalN_tro_P25-Oct-16 8:03 
GeneralRe: An interesting (or not) thing about C#'s var Pin
Marc Clifton25-Oct-16 8:17
mvaMarc Clifton25-Oct-16 8:17 
GeneralRe: An interesting (or not) thing about C#'s var Pin
Eddy Vluggen25-Oct-16 9:23
professionalEddy Vluggen25-Oct-16 9:23 
Simple case against that reasoning; var does not just hide the type, it accepts every type - and that might change, without going noticed when using var. When you specify which interface you are using you don't run into that problem.

Then again, that is covered by the first paragraph in your post, by the "not being an idiot" bit. Combine both, and you'd get below example;
C#
var con = (IDbConnection) Factory.GetConnectable();
If you are talking about readability, I'd recommend against stating the obvious and ommitting "this" until it is actually required.
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]

GeneralRe: An interesting (or not) thing about C#'s var Pin
Dan Neely25-Oct-16 10:08
Dan Neely25-Oct-16 10:08 
GeneralRe: An interesting (or not) thing about C#'s var Pin
Eddy Vluggen25-Oct-16 10:16
professionalEddy Vluggen25-Oct-16 10:16 
GeneralRe: An interesting (or not) thing about C#'s var Pin
Dan Neely25-Oct-16 10:21
Dan Neely25-Oct-16 10:21 
GeneralMessage Removed Pin
25-Oct-16 11:00
professionalN_tro_P25-Oct-16 11:00 
GeneralRe: An interesting (or not) thing about C#'s var Pin
Eddy Vluggen25-Oct-16 11:19
professionalEddy Vluggen25-Oct-16 11:19 
GeneralMessage Removed Pin
25-Oct-16 11:31
professionalN_tro_P25-Oct-16 11:31 
GeneralRe: An interesting (or not) thing about C#'s var Pin
Eddy Vluggen25-Oct-16 11:41
professionalEddy Vluggen25-Oct-16 11:41 
GeneralMessage Removed Pin
25-Oct-16 11:57
professionalN_tro_P25-Oct-16 11:57 
GeneralRe: An interesting (or not) thing about C#'s var Pin
Eddy Vluggen26-Oct-16 2:57
professionalEddy Vluggen26-Oct-16 2:57 
GeneralMessage Removed Pin
26-Oct-16 3:24
professionalN_tro_P26-Oct-16 3:24 
GeneralRe: An interesting (or not) thing about C#'s var Pin
Eddy Vluggen26-Oct-16 3:56
professionalEddy Vluggen26-Oct-16 3:56 
GeneralRe: An interesting (or not) thing about C#'s var Pin
Sander Rossel25-Oct-16 10:39
professionalSander Rossel25-Oct-16 10:39 
GeneralMessage Removed Pin
25-Oct-16 11:03
professionalN_tro_P25-Oct-16 11:03 
GeneralRe: An interesting (or not) thing about C#'s var Pin
Sander Rossel25-Oct-16 11:43
professionalSander Rossel25-Oct-16 11:43 
GeneralMessage Removed Pin
25-Oct-16 12:08
professionalN_tro_P25-Oct-16 12:08 
GeneralRe: An interesting (or not) thing about C#'s var Pin
Sander Rossel25-Oct-16 12:26
professionalSander Rossel25-Oct-16 12:26 
GeneralRe: An interesting (or not) thing about C#'s var Pin
Jeremy Falcon26-Oct-16 8:43
professionalJeremy Falcon26-Oct-16 8:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.