JPDev@programming.dev to Programmer Humor@programming.dev · 8 months agoWhitespaceprogramming.devimagemessage-square10fedilinkarrow-up17arrow-down10
arrow-up17arrow-down1imageWhitespaceprogramming.devJPDev@programming.dev to Programmer Humor@programming.dev · 8 months agomessage-square10fedilink
minus-squaredarkpanda@lemmy.calinkfedilinkarrow-up0·8 months agoI also sometimes wish that the syntax in if statements was inverted, where () was optional and {} was required.
minus-squareClay_pidgin@sh.itjust.workslinkfedilinkEnglisharrow-up0·edit-28 months agoCan you give me an example? I’m not sure I follow. Might be language specific?
minus-squarenoli@programming.devlinkfedilinkarrow-up1·8 months agoif(condition) statement; Is valid in typical C-style syntax. if condition { … } Is invalid in typical C-style syntax
I also sometimes wish that the syntax in
if
statements was inverted, where()
was optional and{}
was required.Can you give me an example? I’m not sure I follow. Might be language specific?
if(condition) statement; Is valid in typical C-style syntax.
if condition { … }
Is invalid in typical C-style syntax