𝙈𝙞𝙖@quokk.au to Programmer Humor@programming.devEnglish · 1 天前Paradoxquokk.auimagemessage-square65fedilinkarrow-up1811
arrow-up1811imageParadoxquokk.au𝙈𝙞𝙖@quokk.au to Programmer Humor@programming.devEnglish · 1 天前message-square65fedilink
minus-squareSkullgrid@lemmy.worldlinkfedilinkarrow-up18·1 天前come the fuck on string bigIfTrue(Boolean size) { string toAssign = ''; if (size == true) { toAssign = 'big'; } else { toAssign = 'small'; } return toAssign; }
minus-squareOpenStars@discuss.onlinelinkfedilinkEnglisharrow-up2·4 小时前Syntactically correct - the best kind of correct!!
minus-squareAxolotl@feddit.itlinkfedilinkarrow-up5·edit-215 小时前String bigIfTrue(Boolean size) { if (size == true){ return "big" } return "small"; }
minus-squarefruitycoder@sh.itjust.workslinkfedilinkarrow-up2·6 小时前This actually gets loaded as a WASM module by a server less API service when a user ask if true return big
come the fuck on
string bigIfTrue(Boolean size) { string toAssign = ''; if (size == true) { toAssign = 'big'; } else { toAssign = 'small'; } return toAssign; }So very wrong.
“big” != “Big”
shit time to
git commit sudokuSyntactically correct - the best kind of correct!!
true ? 'big' : '';My beloved
String bigIfTrue(Boolean size) { if (size == true){ return "big" } return "small"; }Bloat. Nobody asked for else.
Or assignment. Just return.
Where’s your interface and factory?
This actually gets loaded as a WASM module by a server less API service when a user ask if true return big
hey, this is for fun and pseudocode.
Saved
That is indeed a big one!