TadoTheRustacean@programming.dev to Programmer Humor@programming.dev · 7 months agoWhat are variables and semicolons for actually?message-squaremessage-square36fedilinkarrow-up1111arrow-down18file-text
arrow-up1103arrow-down1message-squareWhat are variables and semicolons for actually?TadoTheRustacean@programming.dev to Programmer Humor@programming.dev · 7 months agomessage-square36fedilinkfile-text
minus-squaremarcos@lemmy.worldlinkfedilinkarrow-up7·7 months agoDo not expect to find anything like Javascript craziness on other languages. Or you’ll be severely disappointed.
minus-squareFizzyOrange@programming.devlinkfedilinkarrow-up6arrow-down2·7 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·7 months agoJS and PHP are by themselves in a special ring of hell.
minus-squareTadoTheRustacean@programming.devOPlinkfedilinkarrow-up3arrow-down2·7 months agoBash is a bigger one. Luckily there’s nushell
minus-squarejubilationtcornpone@sh.itjust.workslinkfedilinkEnglisharrow-up4·7 months agofor (const item in items) { } != for (const item of items) { }
minus-squarexigoi@lemmy.sdf.orglinkfedilinkarrow-up2·7 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)