Kaptaan Jack@lemmy.ml to Programmer Humor@lemmy.ml · 1 year agoProgramming Languageslemmy.mlexternal-linkmessage-square178fedilinkarrow-up1769arrow-down164file-text
arrow-up1705arrow-down1external-linkProgramming Languageslemmy.mlKaptaan Jack@lemmy.ml to Programmer Humor@lemmy.ml · 1 year agomessage-square178fedilinkfile-text
minus-squareRagingNerdoholic@lemmy.calinkfedilinkarrow-up3arrow-down1·1 year agoIn my experience (Javascript and PHP, which both have plenty of footguns), these pitfalls can be avoided by using good practices. Just because they are dynamically typed doesn’t mean you have to use dynamic typing. Don’t type switch your variables. Just because you don’t have to use brackets in a certain scenario doesn’t mean you can’t. Use them as needed for clarity. That kind of thing.
In my experience (Javascript and PHP, which both have plenty of footguns), these pitfalls can be avoided by using good practices.
Just because they are dynamically typed doesn’t mean you have to use dynamic typing. Don’t type switch your variables.
Just because you don’t have to use brackets in a certain scenario doesn’t mean you can’t. Use them as needed for clarity.
That kind of thing.