
Ask HN: Should I Be Ashamed to Love JavaScript? - gitgud
I feel like JavaScript is the laughing stock of the programming community sometimes... It&#x27;s inefficient, messy, not typechecked, full of beginners...<p>But it runs extremely easily on pretty much everything! and can be distributed and run instantly through any browser.<p>Maybe I feel like it&#x27;s too easy compared to other languages and is downplayed as a <i>newb</i> language...<p>Maybe it just doesn&#x27;t seem as cool as other languages like <i>rust</i> and <i>go</i>...
======
tomcam
Of course not, and it's sure as hell not the laughingstock of hundreds of
thousands of developers who make a living knowing it.

Javascript is a big, sprawling, and (from day 1) very useful language. Like
English, it has many many flaws and has many antecedents. Like English, it's
evolved to be highly functional. The last two versions are first rate
languages. The runtime environments (browsers, compilers, etc.) are among the
most sophisticated, comprehensive pieces of software passionately maintained
by some of the smartest people in the world working in friendly competition,
and we don't have to pay a red cent for their work product.

I started programming in 1983, so about 7 years after the microcomputer took
off. The very first version of Javascript was a shaggy dog but it was far more
capable than interpeters selling for hundreds of dollars at that time.

The pedants who bitch about Javascript should get over themselves. I wish my
life had so few problems that I could spend my precious time on this planet
denigrating something given to me and every browser user for free.

------
jacob019
I was always a JS hater. I mostly work with python these days, but JS is
required for UI development. Since I am targeting internal apps where we
control the browser, I get to use the latest ES6 features without polyfills. I
have to say that JS has come a long way, and some of the latest features are
pretty awesome. Requests is so much more pleasant to work with that the old
XMLHttpRequest, imports are great, the fat arrow has made my life so much
easier, and the modern reactive frameworks are amazing. Sometimes I find
myself wishing we had certain things in python, the regex syntax is more
elegant and doesn't feel like a hack. And compared to Python, concurrency
takes less effort. It's certainly easier to write spaghetti code in JS, but
you can write bad code in any language. It's truly amazing what a flexible
computing environment the modern browser has become.

------
triplee
No. You shouldn't be ashamed of ANY language or technology, as long as you
feel it's appropriate for doing whatever problem is put in front of you.

Also remember that at various times, PHP, Ruby, Python, Perl, COBOL,
ColdFusion, literally anything made by Microsoft, Java, and countless other
languages that solved plenty of interesting problems and both led to people
getting paid but also improving and creating other things have been laughed
at.

As a converse, plenty of people have made absolute garbage in any number of
open source frameworks, "sexy" languages du jour, etc. either because they
were working alone and didn't think they needed help or what they were working
on wasn't remotely suited to the tool.

Ignore the haters. It's usually gatekeeping coming from lack of confidence and
fear of real competition due to years of poor attitudes in our industry on
what makes a "real programmer".

------
atestu
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.

~~~
duhi88
I like that analogy.

------
alan_wade
I got into programming because I want to make cool stuff, not because I want
to contemplate the transcendent beauty of pure functions and elegant code.

JavaScript is what enables me to make stuff I couldn't make with the same
amount of time/effort using any other tool I came across.

Do I wish I could do the same stuff using Racket? Sure, I guess. But in the
world I live in, JS is the best tool I could find for doing what I want.

Also maybe it's just me, but I've been programming for 5 years, and I haven't
actually ever felt that frustrated or inadequate when programming JS, I like
it no less than python.

I got used to looking down on JavaScript as a "bad" language from reading
snarky comments made by people who, I suspect, also jumped on the hate train
because they've heard others talking shit about it. I'm not a computer
scientist, maybe there are some legitemate reasons to dislike JS, but I don't
think they're serious enough to warrant all the hate it gets in programming
community, I'm guessing it's mostly a social phenomena.

At least personally I haven't run into things that make me dislike it, I have
a lot of fun using it.

------
drinchev
Although most of the replies will be "No, because <REASON...>", what is more
important is to find the reason that suits yourself. You can of course find :

\- Libraries that makes it efficient ;

\- Plenty of styleguides / do / don't rules which makes it tidy ;

\- TypeScript, where JS becomes statically typed ;

\- Find beginners in any other languages, although "full of beginners" is
actually positive, rather than negative.

\- You can feel like a real pro if you write C / C++, but you will rarely be
hired to make a REST API with that stack and you will not be hired to create a
web app with it. So your statement might be more accurate if you say "Web
development is downplayed as a newb", which is obviously wrong. Sure I would
not recommend to write a database based on NodeJS or a search engine, or a
space shuttle program, or a ... you name it, but you can't write with anything
else ( at least serious ) than JavaScript or something that compiles to JS,
for web development.

\- Cool is also relative. I was writing Perl for 6 years, before I run out of
job prospects and switched to NodeJS.

------
notamy
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.

------
RandomGuyDTB
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.

------
jgrahamc
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.

------
maze-le
No, you shouldn't. And don't listen to people trying to shame you because of
it.

>> It's inefficient

Well, its at least as efficient as python or ruby (I think its even slightly
better). If you work on the backend side, and performance is the main goal,
there are other technologies better suited: Go, C#, haskell

A problem might be the concurrency model, but that is an entirely different
topic.

>> messy

Depends on your ability to organize code. Its not that much different than
other technologies, really.

>> not typechecked

True, but there are other dynamically typed languages... People implement
thing in them too. And there is always typescript, if you are interested in
working typesafe.

>> full of beginners...

Everyone was a 'beginner' at some time in their life...

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

There are simple aspects of the language, but take a look at e.g.: Promises[0]
or the Prototype inheritance chain[1] and tell me again that it is simple...
;-)

[0]: [https://developer.mozilla.org/en-
US/docs/Web/JavaScript/Refe...](https://developer.mozilla.org/en-
US/docs/Web/JavaScript/Reference/Global_Objects/Promise)

[1]: [https://developer.mozilla.org/en-
US/docs/Web/JavaScript/Inhe...](https://developer.mozilla.org/en-
US/docs/Web/JavaScript/Inheritance_and_the_prototype_chain)

------
jowiar
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”.

------
xtracto
15 years ago that was PHP...

A language is not something you should be ashamed of. You should learn more
than one though, so that you understand the advantages and disadvantages of
different paradigms and implementations.

Should you be ashamed of loving your hammer? NO, but you should be ashamed of
using your hammer to unscrew screws.

------
sargun
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.

------
Nikkau
> I feel like JavaScript is the laughing stock of the programming community
> sometimes...

Don't worry, it's PHP.

------
sbilstein
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.

------
hawski
Programming languages will not love you back. Maybe it's nothing to be ashamed
about, although it seems a bit silly for me. I may take the word "love" too
serious, but that's also how I feel you are taking your relationship with a
glorified screwdriver.

In case of JavaScript I have one reservation, that by enabling adtech it's
helping to screw other people on their own computers. Of course it could be
some other language, it's not like JavaScript is inherently for this purpose
alone.

------
sick_of_web_dev
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
:)

~~~
drivingmenuts
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.

------
jillav
No you shouldn't be ashamed.

Most of the people I met who denigrated javascript with a blazing hate didn't
fully understand its underlying concepts. They were trying to use it like C or
something else. Which can lead to frustration.

You should take pride in being good with your tool, understanding how it's
designed and how to use it to build awesome stuff.

And yes, it's always a good idea to expand one's skill set. Handling
javascript like a boss is one of those skills that a today's programmer can be
proud of.

------
sonofgod
I think Javascript's ubiquity -- it has an implementation in every browser --
is the cause of much of its hatred. No one hates on SNOBOL because it's been
superseded and no-one uses it; but if you're wanting to interface with the
web, there's no other first-class langugage, everything else transpiles to
JavaScript.

I think an opinionated JavaScript interpreter which considered the worst
elements of JavaScript to literally be bugs (e.g. single equals) would help
immensely...

------
andymoe
No, it’s the future and is currently going through a renaissance. Full stack
js is especially compelling and productive.

------
kgraves
No. if you use JavaScript and you like it that's fine, you shouldn't be
ashamed of it.

------
randiantech
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.

~~~
gitgud
Interesting, I guess it's still haunted by its past...

------
rjkennedy98
The functional programming community loves it, especially with the
introduction of ES6.

~~~
erikpukinskis
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.

~~~
jacob019
Love it or hate it ES6 is here to stay. I for one love it.

~~~
flavio81
Still no integers,

no strict typing,

no sane module system.

~~~
jacob019
ES6 imports works well. I've been working on a project that uses them
extensively and it's really improved the organization and structure.

------
cyberprunes
My advice as an internet nobody:

Don't worry about that dumb crap. JS is a good language. It's come a long way
since its dark early days.

People who shit on JS and on those that like it are usually not worth your
time. I find those people are more interested in displaying their intellect or
superiority by being condescending. It's not helpful.

Read and watch Douglas Crockford if you haven't. He has extracted the best
aspects of Javascript to focus on. If you take his advice then I believe you
will find JS to be a very good companion.

Just don't let JS be your only language. No language should be your only
language.

------
biaib
Back in about 2005, I hated javascript. In hindsight, what I hated was cross
browser development and developpers messing webpages with javascript (alerts,
popups, javascript "links" ...). I used noScript intensively (always unless
forced otherwise), and it made the web better. How not to think javascript is
a shame, then ?. Javascript wasn't understood well at the time, and I guess
still isn't by most people. Just learn to understand it it's awesome. So, no.

------
blattimwind
No need to kinkshame people, even if their kink is JavaScript.

------
mschaef
JS is not without its problems, but it has attracted both a huge amount of
mindshare and corporate investment over the last twenty years. Those both go a
long way towards fixing many of the initial problems of the language.

While it isn't the language I'd have necessarily chosen to be as widespread as
it it, the industry could have wound up making a far worse choice, and I'm
grateful it didn't.

------
topkai22
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.

------
EyLuismi
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.

------
ninjakeyboard
Javascript has gotten a lot better. IMO there are nicer languages to swoon
over but it's fine to love JS too :)

------
julianozen
Nope! All language/technologies are tools. Developers have (lots) of opinions
but at the end of the day all of these things exist to solve user and business
problems. JavaScript does both effectively

It is however useful to have a critical eye so that one can assess what is the
right tool for a particular job.

------
janpot
I love JavaScript. A good craftsman never blames his tools.

------
gnoirzox
> 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..

------
z_
Yes.

------
crawdog
As long as it isn't PHP you should be ok...

------
kgwxd
Sounds like what you love is the widespread support and ease of deployment,
which aren't properties of the language itself.

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

~~~
blattimwind
> Don't be ashamed only if you are good at it.

Not sure if intentional pun

------
fucking_tragedy
ES6+ eased a lot of pain around writing Javascript. It's actually a very nice
language from a user standpoint.

------
davman
At least it isn't VB.

