TadoTheRustacean@programming.dev to Programmer Humor@programming.dev · 8 months 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 · 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-squareFizzyOrange@programming.devlinkfedilinkarrow-up6·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-squareTadoTheRustacean@programming.devOPlinkfedilinkarrow-up3·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)