TadoTheRustacean to Programmer Humor · 8 months agoWhat are variables and semicolons for actually?message-squaremessage-square36fedilinkarrow-up1112arrow-down18file-text
arrow-up1104arrow-down1message-squareWhat are variables and semicolons for actually?TadoTheRustacean to Programmer Humor · 8 months agomessage-square36fedilinkfile-text
minus-squaremarcos@lemmy.worldlinkfedilinkarrow-up7·8 months agoDo not expect to find anything like Javascript craziness on other languages. Or you’ll be severely disappointed.
minus-squareFizzyOrangelinkfedilinkarrow-up6arrow-down2·8 months agoThere are plenty of languages with warts at least as bad as JavaScript’s. Bash, PHP, C, even relatively sane languages like Python still have huge issues like implicit variable declaration.
minus-squareSpaceNoodle@lemmy.worldlinkfedilinkarrow-up6·8 months agoJS and PHP are by themselves in a special ring of hell.
minus-squareTadoTheRustaceanOPlinkfedilinkarrow-up3arrow-down2·8 months agoBash is a bigger one. Luckily there’s nushell
minus-squarejubilationtcornpone@sh.itjust.workslinkfedilinkEnglisharrow-up4·8 months agofor (const item in items) { } != for (const item of items) { }
minus-squarexigoi@lemmy.sdf.orglinkfedilinkarrow-up2·8 months agoStill better than for _, item in ipairs(items)
Do not expect to find anything like Javascript craziness on other languages. Or you’ll be severely disappointed.
There are plenty of languages with warts at least as bad as JavaScript’s. Bash, PHP, C, even relatively sane languages like Python still have huge issues like implicit variable declaration.
JS and PHP are by themselves in a special ring of hell.
Bash is a bigger one. Luckily there’s nushell
for (const item in items) { }
!=
for (const item of items) { }
Still better than
for _, item in ipairs(items)