this post was submitted on 16 Jul 2023
659 points (92.3% liked)

Programmer Humor

32571 readers
482 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 

No offence

you are viewing a single comment's thread
view the rest of the comments
[–] Iteria@sh.itjust.works 22 points 1 year ago (2 children)

Because it's inescapable. Web development is by far the most common type of programming work and even if you're a backend developer you tend to have to touch javascript at some point, so everyone knows the pain of javascript's foot guns and javascript has a lot.

The fact that it's mandatory to do your work invokes bitterness in people. For backend, you can kind of switch around until you find a language you like. For frontend, it's javascript or nothing at all.

Javascript as a language is very out of sync with other commonly used languages. Its footguns are very easy to run into. As a result you have a lot of rituals around just not shooting yourself in the foot. The rituals, libraries, and frameworks around avoiding Javascript's foot guns have been very shifting and changing. Of course, because the javascript ecosystem changes far faster than other languages, there are a lot of rakes for developers to step on to add to the naturally existing foot guns.

Javascript as a language probably shouldn't be the sole language of the internet for a variety of reasons. It's a very hateable language because of how easy it is for newbies to make new terrible code and how common it is. Until something like WASM takes off, the downpour of hate for javascript will continue.

[–] masterspace@lemmy.ca 3 points 1 year ago* (last edited 1 year ago)

Javascript as a language is very out of sync with other commonly used languages.

How so? Moving back and forth between Typescript and C# / Java is pretty natural imho, as long as you understand the compiled vs interpreted differences.

[–] RagingNerdoholic@lemmy.ca 2 points 1 year ago

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.