jroid8@lemmy.world to Programmer Humor@lemmy.ml · 1 year agoTests are code toolemmy.worldimagemessage-square77fedilinkarrow-up11.4Karrow-down121
arrow-up11.38Karrow-down1imageTests are code toolemmy.worldjroid8@lemmy.world to Programmer Humor@lemmy.ml · 1 year agomessage-square77fedilink
minus-squaremarcos@lemmy.worldlinkfedilinkarrow-up4·1 year agoThat kind of code usually is written on a restricted dialect of C. C is not a language that allows for that kind of safety practice even on the fully-featured version.
minus-squareDuralf@lemmy.worldlinkfedilinkarrow-up3·1 year agoEven in C this is possible. Just wrap the float or whatever in a struct and all implicit conversions will be gone.
minus-squarejbrains@sh.itjust.workslinkfedilinkarrow-up1·1 year agoIndeed, this is a time for naming conventions that communicate the details that the type system can’t clarify. This leads to the long names that senior programmers make fun of. Don’t listen to them; let them laugh then make this kind of mistake.
That kind of code usually is written on a restricted dialect of C.
C is not a language that allows for that kind of safety practice even on the fully-featured version.
Even in C this is possible. Just wrap the float or whatever in a struct and all implicit conversions will be gone.
Indeed, this is a time for naming conventions that communicate the details that the type system can’t clarify. This leads to the long names that senior programmers make fun of. Don’t listen to them; let them laugh then make this kind of mistake.