Click here to Skip to main content
14,304,331 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: Sometimes when I can't figure out a problem I taunt myself Pin
Dominic Burford18-Jul-19 5:29
professionalDominic Burford18-Jul-19 5:29 
GeneralRe: Sometimes when I can't figure out a problem I taunt myself Pin
honey the codewitch18-Jul-19 5:33
memberhoney the codewitch18-Jul-19 5:33 
GeneralRe: Sometimes when I can't figure out a problem I taunt myself Pin
Richard Deeming18-Jul-19 1:19
mveRichard Deeming18-Jul-19 1:19 
GeneralRe: Sometimes when I can't figure out a problem I taunt myself Pin
Nathan Minier18-Jul-19 1:23
professionalNathan Minier18-Jul-19 1:23 
GeneralRe: Sometimes when I can't figure out a problem I taunt myself Pin
jsc4218-Jul-19 2:20
professionaljsc4218-Jul-19 2:20 
GeneralRe: Sometimes when I can't figure out a problem I taunt myself Pin
honey the codewitch18-Jul-19 5:19
memberhoney the codewitch18-Jul-19 5:19 
GeneralRe: Sometimes when I can't figure out a problem I taunt myself Pin
honey the codewitch18-Jul-19 5:16
memberhoney the codewitch18-Jul-19 5:16 
GeneralRe: Sometimes when I can't figure out a problem I taunt myself Pin
Richard Deeming18-Jul-19 1:28
mveRichard Deeming18-Jul-19 1:28 
codewitch honey crisis wrote:
if (null == result)

A fan of these "Yoda conditionals" I also used to be, hmmm, yes. Smile | :)

But with C# 7, I now prefer:
if (result is null)

If the null-coalescing assignment operator[^] makes it into C# 8, this line could be further simplified to:
result ??= new Dictionary<string, ICollection<(CfgRule Rule, string Symbol)>>();

Add in target-typed new expressions[^], and you can really annoy the var haters with:
result ??= new();
Smile | :)



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

GeneralRe: Sometimes when I can't figure out a problem I taunt myself Pin
honey the codewitch18-Jul-19 1:34
memberhoney the codewitch18-Jul-19 1:34 
GeneralRe: Sometimes when I can't figure out a problem I taunt myself Pin
  Forogar  18-Jul-19 3:57
professional  Forogar  18-Jul-19 3:57 
GeneralRe: Sometimes when I can't figure out a problem I taunt myself Pin
Marc Clifton18-Jul-19 6:28
protectorMarc Clifton18-Jul-19 6:28 
GeneralRe: Sometimes when I can't figure out a problem I taunt myself Pin
honey the codewitch18-Jul-19 6:30
memberhoney the codewitch18-Jul-19 6:30 
GeneralRe: Sometimes when I can't figure out a problem I taunt myself Pin
W Balboos18-Jul-19 6:30
mveW Balboos18-Jul-19 6:30 
GeneralRe: Sometimes when I can't figure out a problem I taunt myself Pin
honey the codewitch18-Jul-19 6:31
memberhoney the codewitch18-Jul-19 6:31 
GeneralRe: Sometimes when I can't figure out a problem I taunt myself Pin
Super Lloyd18-Jul-19 14:30
memberSuper Lloyd18-Jul-19 14:30 
GeneralRe: Sometimes when I can't figure out a problem I taunt myself Pin
honey the codewitch18-Jul-19 23:38
memberhoney the codewitch18-Jul-19 23:38 
GeneralRe: Sometimes when I can't figure out a problem I taunt myself Pin
AnotherKen19-Jul-19 7:24
professionalAnotherKen19-Jul-19 7:24 
GeneralRe: Sometimes when I can't figure out a problem I taunt myself Pin
honey the codewitch19-Jul-19 7:25
memberhoney the codewitch19-Jul-19 7:25 
GeneralFor pointyhairs and other friends of hollow phrases Pin
CodeWraith18-Jul-19 0:06
memberCodeWraith18-Jul-19 0:06 
GeneralRe: For pointyhairs and other friends of hollow phrases Pin
musefan18-Jul-19 0:34
membermusefan18-Jul-19 0:34 
GeneralRe: For pointyhairs and other friends of hollow phrases Pin
lopatir18-Jul-19 0:56
memberlopatir18-Jul-19 0:56 
GeneralRe: For pointyhairs and other friends of hollow phrases Pin
glennPattonWork18-Jul-19 4:34
professionalglennPattonWork18-Jul-19 4:34 
GeneralRe: For pointyhairs and other friends of hollow phrases Pin
Sander Rossel18-Jul-19 1:23
professionalSander Rossel18-Jul-19 1:23 
GeneralRe: For pointyhairs and other friends of hollow phrases Pin
Richard Deeming18-Jul-19 1:31
mveRichard Deeming18-Jul-19 1:31 
GeneralRe: For pointyhairs and other friends of hollow phrases Pin
den2k8818-Jul-19 3:02
professionalden2k8818-Jul-19 3:02 

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.