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