Ask HN: Should I Be Ashamed to Love JavaScript?

31 points by gitgud ↗ HN
I feel like JavaScript is the laughing stock of the programming community sometimes... It's inefficient, messy, not typechecked, full of beginners...

But it runs extremely easily on pretty much everything! and can be distributed and run instantly through any browser.

Maybe I feel like it's too easy compared to other languages and is downplayed as a newb language...

Maybe it just doesn't seem as cool as other languages like rust and go...

51 comments

[ 4.1 ms ] story [ 112 ms ] thread
A programming language is like a type of art. Some people love oil painting, some people hate it, some people don't know how to get the colors to mix. Some people hate using a pen for art. I think it's just subjective.
No, it’s the future and is currently going through a renaissance. Full stack js is especially compelling and productive.
No need to kinkshame people, even if their kink is JavaScript.
The functional programming community loves it, especially with the introduction of ES6.
ES6 is the worst thing that ever happened to JavaScript.

JavaScript's one best attribute was that it would run on any device. No longer true.

It's second best attribute was a simple threading model. Promises and async wrecked that.

The third best attribute was it was easy to learn. But in ES6 there are twice as many control structures to learn, with no added power. =>, class, const, etc. They just add more things to think about, without solving any problems.

Well, except that people didn't like learning closures and prototypes. And now they don't have to. So you can program in JavaScript now without learning it if you want.

And you don't have to write the word "function" and "this" a lot. So you save 2% on code size.

ES5 Forever.

Love it or hate it ES6 is here to stay. I for one love it.
(comment deleted)
Still no integers,

no strict typing,

no sane module system.

ES6 imports works well. I've been working on a project that uses them extensively and it's really improved the organization and structure.
Javascript has evolved enough during these years to a point that is no longer a "joke". Theres yet some kind of inertia from past, when JS was basically a form validation language, but current state of language is a complete different story.
Interesting, I guess it's still haunted by its past...
I love it too. To me, Javascript is like my phone camera. Sure, DSLRs take better pictures but the best camera is the one that's always with me, and that's Javascript.
I like that analogy.
No. if you use JavaScript and you like it that's fine, you shouldn't be ashamed of it.
> I feel like JavaScript is the laughing stock of the programming community sometimes...

Don't worry, it's PHP.

Javascript has gotten a lot better. IMO there are nicer languages to swoon over but it's fine to love JS too :)
At least it isn't VB.
(comment deleted)
You should use the tools that work for you, and not be ashamed of that. Getting caught up in "X is cooler than Y" "X said that Y is better than Z for everything" etc. is counterproductive. Other people's opinions won't (necessarily) be right for you.
As long as it isn't PHP you should be ok...
> It's inefficient, messy, not typechecked, full of beginners...

Well PHP is worth on those stuff..

As long as you can make stuff happen with it, I guess that's fine..

Javascript, my friend, is like english: Easy to learn, Hard to master. Don't be ashamed only if you are good at it.
> Don't be ashamed only if you are good at it.

Not sure if intentional pun

No, you should not. If you have mastered the tools you are using then you should be proud of your ability and your ability to get things done. Languages get laughed at over time and JavaScript is no exception. It's also amazingly popular. Personally, I regularly use Perl for small jobs, that's a language that gets ridiculed but I'm super fluent in it. I also write things in C, C++, Go, ...

The only reason to be ashamed would be if you only program in JavaScript and can't imagine ever using anything else. Learn many languages, master some, use different languages for different problems.

You do you. Don't give a f*ck about what others think. Every programming language has its pros and cons and all of them are beautiful in its own way.

Even brainfuck is beautiful, maybe is not productive, but its unique.

Don't waste your time worrying about that even if there is not market, if you really like a language you will find a job if thats what you want.

I love JavaScript. A good craftsman never blames his tools.
Nope, it’s improved a lot and approaches greatness for the reasons you mention.

It still drives ME crazy because it lets many of my colleagues produce unreadable hard to understand spaghetti code in a way I don’t see with more structured (and tool friendly) languages like C#, Java, or purer functional languages, but well written JavaScript can be a delight.

Yes.
It's not as bad as PHP but yeah JavaScript or rather the community around it is largely made up of sub-par web developers (you, oh dear reader are of course the exception). Obviously you will not find as many clueless people in say embedded software development or even electrical engineering as these require a certein set of requisite skills and theory whereas every idiot can call themselves a web developer.

But yeah as long as you enjoy what you're doing, you shouldn't worry about it :)

As a PHP programmer, I should probably resent some part of your answer, so consider it pro-forma resented.

OTOH, I get paid to work with PHP, so really, I don't worry about what other people think of it.

@sick_of_web_dev you sound a little biased against Web Developers ;)
I used to make fun of JavaScript. I hated JavaScript, it was confusing (wtf is prototype?), easy to screw up in, and didn’t have a real concurrency model.

But then I realized this didn’t matter. The JavaScript community is was evolving at a ridiculous rate. These weaknesses slowly left their blood, and honestly, now I’m left envious. I enjoy writing Flow, poking around with new ideas like async / await, and envy the sheer performance that JavaScript has attained.

I still find JavaScript and often the people associated with JavaScript to be hard to like at times, but it’s a language with great possibilities.

When someone does the denegrating you mention (and folks do), they go on my “I’ll never work with them” list. I’ve had folks do it in an interview and it’s an immediate no-hire.

JS is a tool, just like on the any other. It has some big pluses, and some annoying “WTFs”, but today, it’s a more-than-solid default answer to “What should I write my webapp in”.

Sounds like what you love is the widespread support and ease of deployment, which aren't properties of the language itself.
I was mostly in the Scala/Java world for a long time and laughed at the JS community’s obsession with reinventing things. Somehow I ended up using Node on every side project over the years because it was pretty easy to work with.

Fast-forward to now...I’ve decided to build my startup on typescript and node. I find the easy sharing of libraries and types across frontend and backend very liberating.

TS/ES6 are mature and run everywhere. Easy for beginners but functional enough for me. It’s taken me a while but I love JavaScript.