Click here to Skip to main content
16,020,313 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!

 
NewsBiden wants to break Apple and Google’s control over mobile app distribution Pin
Kent Sharkey1-Feb-23 8:16
staffKent Sharkey1-Feb-23 8:16 
GeneralRe: Biden wants to break Apple and Google’s control over mobile app distribution Pin
Nelek1-Feb-23 11:17
protectorNelek1-Feb-23 11:17 
GeneralRe: Biden wants to break Apple and Google’s control over mobile app distribution Pin
den2k881-Feb-23 21:03
professionalden2k881-Feb-23 21:03 
NewsMicrosoft will notify you when a new widget is available Pin
Kent Sharkey1-Feb-23 8:01
staffKent Sharkey1-Feb-23 8:01 
GeneralRe: Microsoft will notify you when a new widget is available Pin
Nelek1-Feb-23 11:16
protectorNelek1-Feb-23 11:16 
NewsBounded Flexible Arrays in C Pin
Kent Sharkey1-Feb-23 8:01
staffKent Sharkey1-Feb-23 8:01 
GeneralRe: Bounded Flexible Arrays in C Pin
Nelek1-Feb-23 11:20
protectorNelek1-Feb-23 11:20 
NewsA moment of silence for all the drives that died in the making of this Backblaze report Pin
Kent Sharkey1-Feb-23 8:01
staffKent Sharkey1-Feb-23 8:01 
GeneralRe: A moment of silence for all the drives that died in the making of this Backblaze report Pin
Nelek1-Feb-23 11:21
protectorNelek1-Feb-23 11:21 
NewsVS Toolbox: MAUI App Accelerator to jump-start .NET MAUI scaffolding Pin
Kent Sharkey1-Feb-23 7:46
staffKent Sharkey1-Feb-23 7:46 
NewsIntroducing ChatGPT Plus Pin
Kent Sharkey1-Feb-23 7:31
staffKent Sharkey1-Feb-23 7:31 
NewsC# is dying Pin
Kent Sharkey1-Feb-23 7:08
staffKent Sharkey1-Feb-23 7:08 
GeneralRe: C# is dying Pin
  Forogar  1-Feb-23 7:17
professional  Forogar  1-Feb-23 7:17 
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 

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.