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-squareGissaMittJobb@lemmy.mllinkfedilinkarrow-up2·8 months agoHaving an asterisk both be the type indicator and the dereference operator is one of the great programming language design blunders of our time, along with allowing nulls for any type in so many languages.
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
Having an asterisk both be the type indicator and the dereference operator is one of the great programming language design blunders of our time, along with allowing nulls for any type in so many languages.
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