0x4E4F@lemmy.dbzer0.com to Programmer Humor@programming.dev · 4 months agoWirks every timelemmy.dbzer0.comimagemessage-square8fedilinkarrow-up165arrow-down17
arrow-up158arrow-down1imageWirks every timelemmy.dbzer0.com0x4E4F@lemmy.dbzer0.com to Programmer Humor@programming.dev · 4 months agomessage-square8fedilink
minus-squareScoopta@programming.devlinkfedilinkarrow-up9arrow-down1·4 months agoI don’t get it? When has this ever fixed a bug? Compiler error sure? But a bug?
minus-squareGamma@beehaw.orglinkfedilinkEnglisharrow-up3·4 months agoI actually had a bug in a game jam freshman year because of this. It was java, so there was a lot of questionable decisions going on, but adding the semicolon fixed it!
minus-squareScoopta@programming.devlinkfedilinkarrow-up1·4 months ago…I want details. Java is my most used language and I want to know lol
minus-squareEranziel@lemmy.worldlinkfedilinkarrow-up1·4 months agoSemicolons are technically optional in JS, but there are some rare cases where omitting them can result in different behaviour. And this is why you should enforce code style, kids. Preferably with an automated tool.
I don’t get it? When has this ever fixed a bug? Compiler error sure? But a bug?
I actually had a bug in a game jam freshman year because of this. It was java, so there was a lot of questionable decisions going on, but adding the semicolon fixed it!
…I want details. Java is my most used language and I want to know lol
Semicolons are technically optional in JS, but there are some rare cases where omitting them can result in different behaviour.
And this is why you should enforce code style, kids. Preferably with an automated tool.