Click here to Skip to main content
15,867,756 members

The Insider News

   

The Insider News is for breaking IT and Software development news. Post your news, your alerts and your inside scoops. This is an IT news-only forum - all off-topic, non-news posts will be removed. If you wish to ask a programming question please post it here.

Get The Daily Insider direct to your mailbox every day. Subscribe now!

 
GeneralRe: C# is dying Pin
PIEBALDconsult1-Feb-23 7:20
mvePIEBALDconsult1-Feb-23 7:20 
GeneralRe: C# is dying Pin
Kent Sharkey1-Feb-23 7:45
staffKent Sharkey1-Feb-23 7:45 
GeneralRe: C# is dying Pin
PIEBALDconsult1-Feb-23 7:56
mvePIEBALDconsult1-Feb-23 7:56 
GeneralRe: C# is dying Pin
Nelek1-Feb-23 11:08
protectorNelek1-Feb-23 11:08 
GeneralRe: C# is dying Pin
obermd1-Feb-23 7:44
obermd1-Feb-23 7:44 
GeneralRe: C# is dying Pin
Tasadit1-Feb-23 21:50
Tasadit1-Feb-23 21:50 
GeneralRe: C# is dying Pin
obermd2-Feb-23 4:22
obermd2-Feb-23 4:22 
GeneralRe: C# is dying Pin
trønderen2-Feb-23 5:58
trønderen2-Feb-23 5:58 
If "var" replaces the same type information that is written in plaintext on the same line, to the right of the equals sign, then I do not see how it makes the code harder to understand. This is typical for an object being initialized by a "new". Saying the same thing twice on the same line is a form of redundancy that I dislike.

If you at programming/compile time cannot know the datatype returned e.g. from a LINQ query, so you must ask at runtime about the details of what you got, I do not see any alternative that is obviously easier to understand than "var".

Of course "var" is sometimes abused. I've seem examples where the programmer - most likely with a background from script languages - seems to say Oh Goody! Now I can pretend that C# is a typeless language! I am in favor of strict typing.

So I cannot agree that "var" is "stupid" - only that there are stupid uses of "var".
GeneralRe: C# is dying Pin
Nelek2-Feb-23 10:03
protectorNelek2-Feb-23 10:03 
GeneralRe: C# is dying Pin
Jeremy Falcon1-Feb-23 8:05
professionalJeremy Falcon1-Feb-23 8:05 
GeneralRe: C# is dying Pin
Nick Polyak1-Feb-23 8:08
mvaNick Polyak1-Feb-23 8:08 
GeneralRe: C# is dying Pin
Slacker0071-Feb-23 8:45
professionalSlacker0071-Feb-23 8:45 
GeneralRe: C# is dying Pin
peterkmx1-Feb-23 9:47
professionalpeterkmx1-Feb-23 9:47 
GeneralRe: C# is dying Pin
TheGreatAndPowerfulOz1-Feb-23 10:23
TheGreatAndPowerfulOz1-Feb-23 10:23 
NewsThe Great Resignation: Where did the millions who quit their jobs go? Pin
Kent Sharkey31-Jan-23 9:01
staffKent Sharkey31-Jan-23 9:01 
GeneralRe: The Great Resignation: Where did the millions who quit their jobs go? Pin
obermd1-Feb-23 4:20
obermd1-Feb-23 4:20 
GeneralRe: The Great Resignation: Where did the millions who quit their jobs go? Pin
Nelek1-Feb-23 11:05
protectorNelek1-Feb-23 11:05 
NewsBuilding software these days: Design thinking, hybrid teams, and, of course, DevOps Pin
Kent Sharkey31-Jan-23 9:01
staffKent Sharkey31-Jan-23 9:01 
NewsGmail creator says ChatGPT might ‘destroy’ Google within 2 years Pin
Kent Sharkey31-Jan-23 8:46
staffKent Sharkey31-Jan-23 8:46 
GeneralRe: Gmail creator says ChatGPT might ‘destroy’ Google within 2 years Pin
maze31-Feb-23 2:58
professionalmaze31-Feb-23 2:58 
GeneralRe: Gmail creator says ChatGPT might ‘destroy’ Google within 2 years Pin
Nelek1-Feb-23 11:03
protectorNelek1-Feb-23 11:03 
NewsA new AI voice tool is already being abused to deepfake celebrity audio clips Pin
Kent Sharkey31-Jan-23 8:46
staffKent Sharkey31-Jan-23 8:46 
GeneralRe: A new AI voice tool is already being abused to deepfake celebrity audio clips Pin
Nelek1-Feb-23 11:02
protectorNelek1-Feb-23 11:02 
GeneralRe: A new AI voice tool is already being abused to deepfake celebrity audio clips Pin
den2k881-Feb-23 21:04
professionalden2k881-Feb-23 21:04 
NewsC# ValueTuple Pin
Kent Sharkey31-Jan-23 8:31
staffKent Sharkey31-Jan-23 8:31 

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.