Why do people hate on this so hard? I can't imagine someone actually knowing js and disliking it. It's just so good

Why do people hate on this so hard? I can't imagine someone actually knowing js and disliking it. It's just so good.

Attached: download.png (225x225, 2K)

Other urls found in this thread:

ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf
twitter.com/SFWRedditImages

Jow Forums is full of hipsters and they hate what's popular regardless if it's good or not.

It's pretty complicated to get it to sync when you want. The rise of Electron apps and bloated JS pages make it offensive.

It's nice when it's small.
The next jump though turns it into cat-wrangling.
The mature leap into angular / typescript is interesting, but can easily become bloated.

There are people who hate web development and blame JS because it's the only front-end language browsers run.
There are people who hate JS being used in bloated desktop development, which to be fair is a legit complaint.
There are brainlets who hate JS because they can't wrap their head around asynchronous code with a few callbacks and promises.
There are people who never touched JS but hate it to fit in.

Because it allows shit like bitcoin miners to be loaded in web pages

JS is the next flash, due to security vulnerabilities and privacy concerns out the ass

>There are people who hate web development and blame JS because it's the only front-end language browsers run.
Yes, the world would literally, unironically, be a much better place if web pages were 100% static and ran no code, in JS or any other language. Almost the entirety of what JS is used to implement is bad. It's a net loss. Almost all of it is malware, advertising, spyware, or just obnoxious UI tinsel that gets in the way for no good reason. The remaining 0.5% could be better implemented as native code.

Web dev was and is a mistake.

>I can't imagine someone actually knowing js and disliking it. It's just so good.
bait

No it's full of college students who learn C, Java, and dabble in intellectual pseudo languages like Go

Javascript is the most powerful of the seven mainstream languages. If you don't understand that, then obviously you have never written any significantly complex JS application. I'm not even memeing.

These are opinions, not facts.

Dynamic + weak typing is pure cancer and it's a wellspring for everything stupid in the language.

The main reason it's hated though is because there are plenty of better languages overall and front end web developement forces js on everyone, though that'll change when wasm levels the playing field.

>I'm a brainlet who needs compiler daddy to babysit me
yikes

web dev IS the mistake. WebAssembly is doubling down on a bad idea.

why are you browsing this web developed web site?

>I'm a brainlet who wastes all day writing unit tests rather than functioning code
yikes

JavaScript is the junk that gets bundled with web content I'm trying to access. I don't program though, because I'm not Indian.

There is nothing that Jow Forums does that requires anything more than get and post. Zero percent of it requires active content. Oh, except for the malware that you have to run an ad blocker to protect yourself from, that definitely needs to run code in your browser to do its job.

>Dynamic + weak typing is pure cancer
People always say this, but what is the actual problem with dynamic typing? I can't remember the last time I encountered a bug in my web application because I was accidentally passing in the wrong type.

I've never written a unit test in my life, pajeet
I write functioning code

it's just freetards seething

it used to be really bad but it's not so bad now. anyone who is a full stack developer will be using it heavily. a lot of the bullying is just to fit in or their attempt at humor.

The language was designed on the back of a cocktail napkin and implemented in a week. It has spent the last 25 years trying to catch up.

It's an ok language for doing basic DOM manipulation. It's not really a good choice for application development. Lack of typing and module/file organization make it hard to write any application of size. That's why you end up with all these development epicycles, writing it in another, better language that compiles to javascript, "webpacks", and the rest of that garbage.

Most non-trivial web-based applications are going to be wasm and written in modern C++ in the next 3-5 years.

What security vulnerabilities does JS have?

Considering nearly every runtime bug can be guarded against in a sophisticated enough type system, you're probably misattributing the reasons for the bugs you have encountered.

Sorry, for a second I thought you were an actual developer.

4chin could not work without js.

I am

OK, kid.

Because they have to use it and some days they don't want to.

Newfag

I create 3d webgl programs in Js for a living
And I came to actually like it.

The vulnerabilities are in the huge, complicated VMs js is executed in. His complaint is with browser scripting in general, not just javascript.

Realistic reasons why people hate it

1) Popular frameworks aren't "just works" like express needs a fuckload of plugins to work, and you'd have to download a hell of a lot of individual things to get the functionality of something like Rails or Django.
So it feels very "yikes..having to install all THIS again"

2) Has no standard library so you have to actually know how to write code to do simple things like reverse a string (which is fucking hilarious because the people who hate it are usually the ones that try to act smug about how JS is a bad language)

3) Some people don't like the fact it's dynamic + weakly typed because sometimes they write dogshit code where this is an issue

4) They have never used it and just hate it

5) They have never used it but disable JS on websites and then get the "this website requires javascript" message and get upset it exists (as if it would change if any other language ran front-end ads)

6) They are forced to use it for front end and don't want to learn it, so they just hate it

That's all I can think of

counterargument: ===

>Jow Forums has malware
bullshit

I don't hate JS but...
Promise & Answers don't make any sense to me and I see no good reason why ECMA6 ditched the much more straightforward callbacks for it
I also dislike not having an include statement

Yes it does.
>revcontent.com
>piguiiqproxy.com
>adglare.net
>smcheck.org
>contentabc.com
>google-analytics.com
those are just the ones I've managed to see. In addition to the captcha, which is served from google.com and gstatic.com

that's kind of the problem, you can pass in anything and JS will just accept it, you have do every single but of data verification yourself
that wouldn't be so bad, I mean assembly does the same thing, but JS will also mess with the data type in a lot of cases, most often and most damagingly when dealing with booleans, simple true and false, to the point there's a special operator just to check if two things are really truly actually the same or just pretending

>Some people don't like the fact it's dynamic + weakly typed because sometimes they write dogshit code where this is an issue

Why do fanboys have to turn every language misfeature into a dickwaving contest whenever they're cornered? You make mistakes like everyone else does, and you're stuck debugging them all at runtime. No amount of posturing is going to make this a good thing. ECMA recognize this as well and have optional types proposed for the next version.

You're free to only use static pages if you want. Others are free to use code in their pages. What's the problem?

I have literally never once in my life made that mistake so far, because I learned at the very start how it works.

The whole "1" + 2 = ?? meme is so stupid, people who struggle with that have brain damage.

Montero miners.
Mining bitcoin is pretyy much dead unless you have a building in china full of noisy boxes & free electricity

>so you have to actually know how to write code to do simple things like reverse a string
And it's not even hard, you can just do:
str.split('').reverse().join('')

its actually quite good once you really learn the nuances.
e.g. implicit comparisons vs. explicit w/ == || ===
or async () => {} for async code
and await w/ .then .catch
OOP is also pretty nice with .bind(), extends etc. its all very clean and easy to read. prototypes are pretty cool as well plus all of the inbuilt functions like .sort(), .forEach(), .map(), .reduce()

some stuff can be pretty cancer though like NaN, undefined shit

> I learned at the very start how it works.
what was your source, share something of wat you know with a jslet, tell me your secrets

>Has no standard library so you have to actually know how to write code to do simple things like reverse a string
wat.
const rev = "asd".split("").reverse().join("");
>rev
>"dsa"

Same here... I've been writing JS for 6 years or so, and I don't think I've ever had any issue caused by the type casting. I read about its pitfalls somewhere online right after I started writing JS in the first place, and it was very easy to avoid those pitfalls.

The "1" + 2 thing is illustrative of the larger problems in the language and bugs that could arise by way of complicated program logic when the runtime blindly casts things, it's not a literal example of something anyone would knowingly type. Strong/static typing prevents a whole class of errors beyond that.

If you've ever made any mistake at all that resulted in something being mistyped or unexpectedly null/undefined and had to open up your browser's debugger, the chances are high you've wasted time unnecessarily due to javascript's misdesign.

yes that's why I said it was a simple thing, but in most languages you can just do .reverse or something similar

You just look at the docs about type coercion and use your brain a little bit

Is the value a falsey value (empty object, string, arr 0, etc) ? then it will return false
If you add a number to a string at any point in time then it must become a string at that point because you can't possibly add a number to a string and have it still be a number
Everything is an object
Other than that the whole "{} = []" memes are just stupid and nobody in the entire world has ever done that in real code, but however you put it it will always return false, or null, or undefined, or an error or something that is not true, so whatever.

it's a terrible language
nobody who knows anything about the internals would say it's good

you have no idea the amount of horrifying things v8 and other runtimes have to do to get decent performance with the fucking nightmare that is javascript

> claiming to be perfect
is that why you're sitting on Jow Forums typing up shitposts rather than making big bucks a real job?

Maybe, but I saved a lot more time because I didn't have to use an explicit type system.
I mean, don't get me wrong, if I was writing code that controlled medical machines or spacecraft, I'd probably want to use a language with a lot of built-in safety, but that's not the kind of code I'm writing. In any case, if you really want a type system in JS you can build your own, and if you want a compile-time run system you can use a language-that-compiles-to-JS or a code analyzer.

>If you've ever made any mistake at all that resulted in something being mistyped or unexpectedly null/undefined and had to open up your browser's debugger, the chances are high you've wasted time unnecessarily due to javascript's misdesign.
Yes, but again unless you are writing dogshit code this rarely happens. So the tradeoff is worth it.

> Maybe, but I saved a lot more time because I didn't have to use an explicit type system.

If most of what you're writing is javascript, how do you know this is true?

A lot of people say this, but I'm not any slower when I'm using a language with type inference


Some of the most highly scrutinized and analyzed programs in the world have had bugs, you're saying you're better than that?

Dynamic typing doesn't save any time anymore, though. It was an intermediate step between when C was the mainstream exemplar of static typing and when generics and type deduction became standard. Writing in statically typed languages is nothing but added convenience now.

If most of what you're writing is statically typed, how do you know you'd actually make a bunch of bugs in a dynamically typed language?

>nobody who knows anything about the internals would say it's good
Really? Like who? Which meme "Javascript expert" are you going to pull out of your ass to back you up? Douglas Crockford? He hasn't even bothered to read the ECMAScript spec. Those who have read the spec rarely complain about the language BECAUSE they understand the internals.

There are a total of two bugs in the entire javascript language. The rest of the "gotchas" that are frequently posted on Jow Forums are not at all unexpected if you've read the spec.

V8 is not that complicated. The most complicated thing it does is hidden classes. The JVM is far more complex and unweildy.

Attached: 0258023985236.png (316x287, 49K)

>I never ever make mistakes
>I've never worked with other people's code and had to be stuck trying to debug something with degrees of complexity
Good, stick to your riced desktop, stickers and 10 line fizzbuzz

>Some of the most highly scrutinized and analyzed programs in the world have had bugs, you're saying you're better than that?
I never said I wrote bug-free code, faggot.

All I'm saying is that if you are frequently producing type-related bugs you are just a bad programmer, period.

If you are working with other people who don't understand it then you should just fire them?

Unless you mean you have no idea how code works and you just fuck it up when you touch it? In which case they should fire you

>If you are working
You already made it clear you don't, or never will

*All* bugs are type-related. If you think you aren't making type-related bugs, it's because javascript expresses them poorly, at runtime.

>ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf

Wow, anyone who hasn't read this 805 pages of language-lawyering standardese bullshit and dared form a negative opinion about javascript should just kill themselves. I can't believe the plebs we have to deal with on this board.

> There are a total of two bugs in the entire javascript language. The rest of the "gotchas" that are frequently posted on Jow Forums are not at all unexpected if you've read the spec.

I didn't say anything about bugs. Just read about how "arrays" work in javascript and think about how to optimize that incredibly retarded bullshit. Most operands can do one of multiple different things based on it's operands, think about how you would optimize that.

How would you optimize the arguments object? etc, etc, I could go on for a while.

There's a reason why tracing JITs became popular in javascript, and that's because they basically let you pretend the insanity doesn't exist, and just throw out a trace in case your assumptions break.

Now, I actually don't think javascript is absolutely terrible as a language in actual usage, it's just nowhere near good, and wasn't designed with real machines in mind at all.

I don't mostly write statically typed code

Is this how people argue on the internet now? They just imply random things and then when you respond to it they just say you don't have a job?

yikes, spotted the guy who works as a "QA tester" for slightly above minimum wage who's fucking ecstatic to get his first job

Jow Forums hates go though

I've spent 2018 learning web development to start attempting bug bounties in my free time like a faggot. I've gone into learning react and some back end stuff. This thread (and some neckbeards at my uni) have been convincing me my time could be better spent learning apache/php. Would any anons in the thread under 25 (old fags fuck off) have any advice as to what modern web devs should be learning?

Attached: birdmanrxn.gif (350x304, 404K)

>*All* bugs are type-related
wut

If you want arrays that work as in C, use TypedArrays. The JS concept of an Array being just a special kind of Object is elegant.

write in node {} === {}

So when an integer is 5 instead of 6 during runtime, that's somehow a type-related error? That doesn't make any fucking sense.

JS compares objects by their internal references, not by their properties. There's nothing wrong with that.

Nobody is learning PHP anymore, PHP is only useful for wordpress retards.

Python is the new PHP, but Python is worse than Node.js..So...You're back to square 1.

It's primary uses in the browser is for flashy fluff features, everything else is hidden advertising scripts, malware, or slow, broken, badly coded BS. Web dev is bloated because of the design practices and "features" that come along with it. You get shit like Node. Desktop JS is its own huge bloated out of scope mistake. Every engine is different and has its own vulnerabilities and every one of them sucks. (hint, the only good JS engine out there is the one that Dillo uses)

also, typing is inconsistent, the language itself is a mess, and i fucking hate webdev anyway so there's that

we should never have advanced past AJAX in the browser

Yes. Runtime constraints on the acceptable values in a variable can be expressed in types at the extreme fringes of static typing, say in dependently typed languages. Even "purely logical errors" where 5 and 6 are both valid in some context basically always reduce to some state being reached earlier on that could have been prevented if only the compiler was warned to look out for it by way of the type system.

There are limits to how far these benefits go in a practical day to day language, but any modern static/strong language offers some benefits over the average 90s scripting language

It's dumb. References should be marked explicitly. If want to compare memory addresses I'll (use a real language and) ask for it.

Have you ever used anything but Python?

I've never used python. What I'm describing is the default in nearly all pass-by-value languages.

What languages pass an array/map/object by value? That's extremely inefficient.

PHP

I said the default, not universal. Most don't pass arrays by value since they're just pointers themselves, but C/C++/Go/Rust/D and probably dozens more all pass objects by value unless you provide some kind of annotation on the object or the receiving functions. For small/medium size objects, the copying involved is often less expensive than pointer-chasing.

>this
>===
>if (!!bool)
>$

fuck JS

>dynamic, weak typing
>inconsistent, unintuitive quirks
>callback hell
>horrifying ecosystem

Attached: javascript.png (270x175, 5K)

var lel;
console.log(lel);
//undefined

Attached: babyheadinass.gif (350x400, 57K)

There is one single reason I hate JavaScript, and it's just the fact that it is so fucking inefficient, bloated and slow. And all of these garbage frameworks that are just forks of other frameworks, with horribly bloated code do not help this. And thanks to nodejs and Electron, people are starting to think its a good idea to write whole desktop applications like Spotify and Discord in fucking javascript.
Open up Task Manager and Discord, then join some voice channel and scroll through text channels and watch as Discord just eats your CPU.

Otherwise I love JavaScript. I think it's a great language for introductory classes in high school, and for people just starting to learn. You can learn all the basic concepts and easily create something nice with javascript which can make it easier for it to appeal to people. It's also great if you want to create scripts for commercial software, like the Adobe products which has a scripting language extended from JS. As well as Unity and Unreal Engine too. Simple projects like bots and scripts on node are nice too, and you can create custom browser extensions and use it in web development.

JavaScript for small projects = Good
JavaScript for software development = Fucking Garbage

that's like saying that the empty set is different to the empty set by vacuity.

Any sane specification would give out true for {} == {}. Anything else is just flawed logic.

And the problem is?

Attached: 5BF2E21F-FF03-4AD9-9509-46EA4B9B9CD0.jpg (221x250, 13K)

I don't hate js. I hate some implementations of it like node.js

>Has no standard library so you have to actually know how to write code to do simple things like reverse a string (which is fucking hilarious because the people who hate it are usually the ones that try to act smug about how JS is a bad language)
You have that backward user. The people who like JS are the ones that DON'T know how to do simple shit like find out whether a number is even and hence import libraries like is-even.

>I have literally never once in my life
I see, so you have only ever written Hello World.

Count the number of time you ever got a compiler error due to mismatched types?

I hate it because the syntax sucks and I also hate it because people want to use it on the server, which is incredibly stupid

Attached: 50E744E5-8A3D-4ECB-96CD-AFF076F951C1.jpg (979x525, 126K)

JavaScript is good for web servers but honestly not much else, which is fine since it was designed for front-end stuff and basically dominates that area anyway. I say this as someone who loves the language and studied node.js religiously for like 2 years.

most miners use webassembly

$: ["10", "10", "10", "10", "10"].map(parseInt)
> [10, NaN, 2, 3, 4]

Attached: 1255997139047.jpg (677x664, 58K)

switch(value)
{
case 1:

break;
}


You know for a language taht loves it's curly braces, they just couldn't make this less crappy ?

Agreed. You can pretty much cut any other language out nowadays from the web completely.

Replace XML with JSON through Mongoose, Cookies with Local Storage and JWT, SQL with MongoDB, do the entire backend with Node. Socket.io and websockets also makes post methods rarely needed even, but those can also be done with Express. You can even add JS to html with shit like EJS.

Hell, even flash got replaced on fucking newgrounds of all places with html5/videojs player and for games canvas.

Also if you really wanna get technical, Gnome is built in JS, you can do phone apps in JS with things like NativeScript, and you can use Unity Script which is practically JS to make more advanced games than what you'd do in canvas.

Also you can replace Skype and other web communications with WebRTC for faster livestreaming and peer chatting.

We're pretty much in the JS era.

> not just .map(eval)
yikes!