Click here to Skip to main content
15,356,098 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: Cosmetic vs More Efficient Pin
Daniel Pfeffer4-May-21 7:34
professionalDaniel Pfeffer4-May-21 7:34 
GeneralRe: Cosmetic vs More Efficient Pin
MarkTJohnson4-May-21 7:40
professionalMarkTJohnson4-May-21 7:40 
GeneralRe: Cosmetic vs More Efficient Pin
Mircea Neacsu4-May-21 9:32
mvaMircea Neacsu4-May-21 9:32 
GeneralRe: Cosmetic vs More Efficient Pin
W Balboos, GHB5-May-21 0:58
mveW Balboos, GHB5-May-21 0:58 
GeneralRe: Cosmetic vs More Efficient Pin
Mircea Neacsu5-May-21 2:47
mvaMircea Neacsu5-May-21 2:47 
GeneralRe: Cosmetic vs More Efficient Pin
W Balboos, GHB5-May-21 2:58
mveW Balboos, GHB5-May-21 2:58 
GeneralRe: Cosmetic vs More Efficient Pin
Kirk 103898215-May-21 3:15
MemberKirk 103898215-May-21 3:15 
GeneralRe: Cosmetic vs More Efficient Pin
agolddog5-May-21 3:19
Memberagolddog5-May-21 3:19 
I agree with this. If your default parameter is only going to be replaced anyway, just go straight to the replacement.

Of course, you still need to allow for null actually being passed (assuming the parameter is of a nullable type), so you'll need the check internally.

I'm ambivalent on the question of ternary vs 'standard' here. The ternary is small and uncomplicated enough to be readable. Personal/team preference there.

GeneralRe: Cosmetic vs More Efficient Pin
PaltryProgrammer4-May-21 10:07
MemberPaltryProgrammer4-May-21 10:07 
GeneralRe: Cosmetic vs More Efficient Pin
11917640 Member 4-May-21 19:10
Member11917640 Member 4-May-21 19:10 
GeneralRe: Cosmetic vs More Efficient Pin
PaltryProgrammer4-May-21 20:54
MemberPaltryProgrammer4-May-21 20:54 
GeneralRe: Cosmetic vs More Efficient Pin
11917640 Member 4-May-21 22:08
Member11917640 Member 4-May-21 22:08 
GeneralRe: Cosmetic vs More Efficient Pin
PaltryProgrammer4-May-21 22:46
MemberPaltryProgrammer4-May-21 22:46 
GeneralRe: Cosmetic vs More Efficient Pin
W Balboos, GHB5-May-21 1:20
mveW Balboos, GHB5-May-21 1:20 
GeneralRe: Cosmetic vs More Efficient Pin
Greg Utas4-May-21 10:01
mveGreg Utas4-May-21 10:01 
GeneralRe: Cosmetic vs More Efficient Pin
W Balboos, GHB5-May-21 1:09
mveW Balboos, GHB5-May-21 1:09 
GeneralRe: Cosmetic vs More Efficient Pin
Greg Utas5-May-21 1:17
mveGreg Utas5-May-21 1:17 
GeneralRe: Cosmetic vs More Efficient Pin
PIEBALDconsult4-May-21 11:04
professionalPIEBALDconsult4-May-21 11:04 
GeneralRe: Cosmetic vs More Efficient Pin
obermd4-May-21 18:48
Memberobermd4-May-21 18:48 
GeneralRe: Cosmetic vs More Efficient Pin
Peter Adam4-May-21 22:07
professionalPeter Adam4-May-21 22:07 
GeneralRe: Cosmetic vs More Efficient Pin
PaltryProgrammer4-May-21 23:09
MemberPaltryProgrammer4-May-21 23:09 
GeneralRe: Cosmetic vs More Efficient Pin
jsc424-May-21 23:31
professionaljsc424-May-21 23:31 
GeneralRe: Cosmetic vs More Efficient Pin
Gary Wheeler5-May-21 1:58
MemberGary Wheeler5-May-21 1:58 
GeneralRe: Cosmetic vs More Efficient Pin
W Balboos, GHB5-May-21 2:37
mveW Balboos, GHB5-May-21 2:37 
GeneralRe: Cosmetic vs More Efficient Pin
KateAshman5-May-21 2:27
MemberKateAshman5-May-21 2:27 

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.


Straw Poll

Do you take a development machine with you on holidays?
A laptop, a mini PC, a tablet that allows you to remove to a Virtual Desktop. There are options.
  Results   163 votes