@[email protected] to Programmer [email protected] • 9 months agoWhat are variables and semicolons for actually?message-square34fedilinkarrow-up1110arrow-down18file-text
arrow-up1102arrow-down1message-squareWhat are variables and semicolons for actually?@[email protected] to Programmer [email protected] • 9 months agomessage-square34fedilinkfile-text
minus-square@marcoslink7•9 months agoDo not expect to find anything like Javascript craziness on other languages. Or you’ll be severely disappointed.
minus-square@[email protected]linkfedilink4•9 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-square@[email protected]OPlinkfedilink1•9 months agoBash is a bigger one. Luckily there’s nushell
minus-square@[email protected]linkfedilinkEnglish4•9 months agofor (const item in items) { } != for (const item of 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)