Click here to Skip to main content
15,904,877 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: AARRGGHHHH!!!!! Pin
PIEBALDconsult13-Apr-15 9:55
mvePIEBALDconsult13-Apr-15 9:55 
GeneralRe: AARRGGHHHH!!!!! Pin
Slacker00713-Apr-15 10:02
professionalSlacker00713-Apr-15 10:02 
GeneralRe: AARRGGHHHH!!!!! Pin
harold aptroot13-Apr-15 10:07
harold aptroot13-Apr-15 10:07 
GeneralRe: AARRGGHHHH!!!!! Pin
Slacker00713-Apr-15 10:11
professionalSlacker00713-Apr-15 10:11 
GeneralRe: AARRGGHHHH!!!!! Pin
harold aptroot13-Apr-15 10:13
harold aptroot13-Apr-15 10:13 
GeneralRe: AARRGGHHHH!!!!! Pin
Slacker00713-Apr-15 10:17
professionalSlacker00713-Apr-15 10:17 
GeneralRe: AARRGGHHHH!!!!! Pin
Pete O'Hanlon13-Apr-15 10:21
mvePete O'Hanlon13-Apr-15 10:21 
GeneralRe: AARRGGHHHH!!!!! Pin
Paul Benson13-Apr-15 21:52
Paul Benson13-Apr-15 21:52 
Interesting discussion.

I found var a bit difficult to cope with at first as it does hide the actual type. Fortunately many IDEs will, as has been pointed out elsewhere, give you the type if you hover over the 'var'. This, however, doesn't help when dealing with printed/quoted code snippets or when working in an environment that doesn't reveal the type.

So, my definition of 'appropriate' is where the type is obvious (usually because the assignment includes the type as part of a 'new' or a typecast of some kind) or because the type is so complicated that it obfuscates itself (e.g. nested generics with multiple parameters). In the latter case I either rely on VS for an explanation or, where possible, simplify the type by creating a new wrapper class/struct with XML help to explain what the class is about.

The basic rule is "Think about other people when writing your code." Always ask yourself 'Can this be understood without having to look through reams of code or relying on an IDE to find variable/type definitions?' If not can it be simplified or explained?" If all else fails use a comment to explain (and thereby starts another argument Sigh | :sigh: ).
GeneralRe: AARRGGHHHH!!!!! Pin
Fabio Franco14-Apr-15 2:01
professionalFabio Franco14-Apr-15 2:01 
GeneralRe: AARRGGHHHH!!!!! Pin
Paul Benson15-Apr-15 3:17
Paul Benson15-Apr-15 3:17 
GeneralRe: AARRGGHHHH!!!!! Pin
Fabio Franco15-Apr-15 3:29
professionalFabio Franco15-Apr-15 3:29 
GeneralRe: AARRGGHHHH!!!!! Pin
CDP180213-Apr-15 20:45
CDP180213-Apr-15 20:45 
GeneralRe: AARRGGHHHH!!!!! Pin
Slacker00713-Apr-15 23:53
professionalSlacker00713-Apr-15 23:53 
GeneralRe: AARRGGHHHH!!!!! Pin
CDP180214-Apr-15 1:32
CDP180214-Apr-15 1:32 
GeneralRe: AARRGGHHHH!!!!! Pin
Sentenryu14-Apr-15 1:11
Sentenryu14-Apr-15 1:11 
GeneralRe: AARRGGHHHH!!!!! Pin
CDP180214-Apr-15 1:28
CDP180214-Apr-15 1:28 
GeneralRe: AARRGGHHHH!!!!! Pin
OriginalGriff13-Apr-15 22:02
mveOriginalGriff13-Apr-15 22:02 
GeneralRe: AARRGGHHHH!!!!! Pin
PIEBALDconsult13-Apr-15 11:07
mvePIEBALDconsult13-Apr-15 11:07 
GeneralRe: AARRGGHHHH!!!!! Pin
Mauro Leggieri13-Apr-15 10:13
Mauro Leggieri13-Apr-15 10:13 
GeneralRe: AARRGGHHHH!!!!! PinPopular
Mladen Janković13-Apr-15 11:02
Mladen Janković13-Apr-15 11:02 
GeneralRe: AARRGGHHHH!!!!! Pin
Slacker00713-Apr-15 12:56
professionalSlacker00713-Apr-15 12:56 
GeneralRe: AARRGGHHHH!!!!! Pin
Fabio Franco14-Apr-15 2:08
professionalFabio Franco14-Apr-15 2:08 
GeneralRe: AARRGGHHHH!!!!! Pin
harold aptroot13-Apr-15 21:57
harold aptroot13-Apr-15 21:57 
GeneralRe: AARRGGHHHH!!!!! Pin
Fabio Franco14-Apr-15 2:05
professionalFabio Franco14-Apr-15 2:05 
GeneralRe: AARRGGHHHH!!!!! Pin
JimmyRopes13-Apr-15 17:56
professionalJimmyRopes13-Apr-15 17:56 

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.