Why JS is bad?

It seems some Sup Forumsentlemen here hate JS. May I ask why?

Other urls found in this thread:

gnu.org/philosophy/javascript-trap.en.html
twitter.com/NSFWRedditVideo

Use it, you will find out very shortly.

sage.

I use it, that's why I ask. It's fast and can do more than others languages (except C/C++ maybe).

It's not bad.

It's not bad. Sup Forums is just full of retards who don't know how to use ===.

Kek.

so, how much languages do you know and for how much time?

It's ugly as a sin down to the bone.

Example:
true == 1 → true
true == "1" → true
false == 0 → true
false == "0" → true

false == undefined → false
false == null → false

null == undefined → true

Thanks for proving

Perl for 3 years, Python 2 years, Cobol 5 years.

>mfw ===

So, not a single language with any feature that comes from functional programming - which doesn't surprise me.
You should look at racket.
Also
>cobol

Javascript is a functional programming language.

exactly - that's why you find it so cool, and think that it can do more than other languages you know.
And that's why I thought that you could like racket.

Thanks, I'll take a look at it then

I'm not getting paid six figures by my employer to write racket.

It's not free

gnu.org/philosophy/javascript-trap.en.html

If you're unwilling to learn, then you should GTFO Sup Forums.

I am willing to learn whatever gets good employment. I don't consider working in the basement of Paul Graham for pennies to be good employment, while there are numerous high paying Javascript positions out there.

but you claim to already being paid six figures. Why are you even here, then?

>I am willing to learn
as you shitpost on an anime image board

Are you saying that employed people aren't allowed to participate in an anonymous mongolian tapestry forum?

It's free, some libraries aren't.

I'm saying that instead of bragging about your willingness to learn you should actually learn something instead of the fucking javascript that everybody and their dog is able to write.

FREE AS FREEDOM

No, JS is unhealthy and shouldn't exist.

I agree, neither should the internet

There are many reasons. One of them is callback hell.

>inb4 use promises
Most existing code isn't compatible woth promises right out of the bat, and it's a bit counter-intuitive in a first sight.

also because its standards are redefined year by year - and I mean A LOT. Babel is the worst abomination I've ever seen personally - wastes an ungodly amount of programmer's time. Might as well using the plain old standard, or any other thing that transpiles to it, like elm/clojurescript/typescript/whatever

>people don't know to use ==== for proper comparisons

-_-

You learn to set up babel once and should be good to go forever. Callback hell sounds avoidable with the project structure

nope for babel. It kinda works for some general use-case stuff - but don't you dare needing something a tiny bit more specific, cause you're gonna need a metric ton of modules for that. And you have to set them CORRECTLY otherwise it'll spit something less readable and understandable than the friggin java stacktraces, and you stay there figuring out why the hell aren't you writing shit in a sane fucking language.
Now for a callback hell - no, you can't avoid that shit. You can use angular or some similar shit - which is even worse than the former.
The only sane thing to do is to resort to FRP, which is godly when applied to GUI. But such stuff actually requires you to use lots of functional features in JS, which do not really work, or even exist - such as immutability. And that's when you start complicating your life with react+redux+babel/JSX/typescript+node for server-side rendering (WTF). I mean, job security is OK, but isn't it going a tiny bit too far for a language created for small hacks in the 90s webpages? That's why Elm/Clojurescript/other languages who compile to JS are created - that shit language isn't cutting it anymore.

I will gladly wait for the bus to fill itself and leave before I go looking for a ticket to Elm/Clojurescript/etc...
>Intended for small hacks
Fair point. The number of frameworks and libraries is mindboggling that are out there to accomplish pretty much what jQuery's been doing for a decade.

That said, I am a solo/freelance developer with few to no concerns about team members having to understand most of my code, so I picked my stack and I'm comfortable. MEAN with Webpack/Babel for build and Karma/Jasmine for testing works just fine for me. I only wish it didn't take me ~2 damn months to learn angular and a shit ton of headdache getting Webpack/Babel working. But going forward I would feel fine getting up and running with a new project in an hour or less, using the same stack

I Use GilletteJS to solve this problem.

>=====

I'm biased since I'm a clojure developer, but clojurescript is REALLY nice imho. I made a small game in a day with it, so it wasn't really that hard. Never tried anything seriously frontend-ish though.

Def will check it out then

The LANGUAGE isn't free. Software written in it isn't always free (which is true of most languages, but it's especially concerning with JS since it's so much more likely than other languages to run on your computer without your consent).

The LANGUAGE is* free.

I use HeliumJS to solve the problem even better
>=========

You can avoid callbacks. That's why promises were made. How sane those promises are really depends on the programmer. The ES standards are at least moving everything forward in a better direction. Funny enough, where I work one of our main project uses exactly that.

But you're right, doing babel for a tiny, specific project is a pain in the ass. But I wouldn't say it wastes a huge amount of my time. I've set babel up a handful of times and then it became quite easy.

Unfortunately, Javascript is what we have and its never going to stop being ridiculously popular because of how easy to pick up and prolific it is.

*One of our main projects uses exactly what you said, react+redux+babel/JSX/typescript+node.

>cobol

eyy it gets you money

Too late you already wrote it. Oracle... freedom...

That's funny

whoah slow down there, the basket weaving joke was ok but I think calling it a mongolian tapestry forum is too close to what it actually is.

Type coercion and overloaded operators, two insurmountable problems if you're a complete retard.

Javascript is beginner friendly, so it lets you write bad code, that doesn't mean you can only write bad code with Javascript. I recommend using a linter.