𝙈𝙞𝙖@quokk.au to Programmer Humor@programming.devEnglish · 2 months agoParadoxquokk.auimagemessage-square57linkfedilinkarrow-up1824arrow-down118
arrow-up1806arrow-down1imageParadoxquokk.au𝙈𝙞𝙖@quokk.au to Programmer Humor@programming.devEnglish · 2 months agomessage-square57linkfedilink
minus-squareSkullgrid@lemmy.worldlinkfedilinkarrow-up20·2 months agocome the fuck on string bigIfTrue(Boolean size) { string toAssign = ''; if (size == true) { toAssign = 'big'; } else { toAssign = 'small'; } return toAssign; }
minus-squareHasherm0n@lemmy.worldlinkfedilinkarrow-up13·2 months agoWhere’s your interface and factory?
minus-squarefruitycoder@sh.itjust.workslinkfedilinkarrow-up3·2 months agoThis actually gets loaded as a WASM module by a server less API service when a user ask if true return big
minus-squareSkullgrid@lemmy.worldlinkfedilinkarrow-up2arrow-down2·2 months agohey, this is for fun and pseudocode.
minus-squareAxolotl@feddit.itlinkfedilinkarrow-up5·2 months agoString bigIfTrue(Boolean size) { if (size == true){ return "big" } return "small"; }
Big if true
come the fuck on
string bigIfTrue(Boolean size) { string toAssign = ''; if (size == true) { toAssign = 'big'; } else { toAssign = 'small'; } return toAssign; }Bloat. Nobody asked for else.
Or assignment. Just return.
true ? 'big' : '';My beloved
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
String bigIfTrue(Boolean size) { if (size == true){ return "big" } return "small"; }That is indeed a big one!