Javascript is not bad, you are

I decided to give my spin on a comic commenting how every solution in js is a problem.

Other urls found in this thread:

jsfuck.com/
karlheinzniebuhr.github.io/en/2015/09/28/C-vs-Go-vs-pypy-vs-Python/
twitter.com/SFWRedditImages

I actually work with JS and even I wouldn't make a thread defending it.

It's not the language itself; it's how people implement it the reason why people hate it.

JS was cool in the days when it was just used to make browser game or add drop-down menus and other optional bling. But if you didn't have JS enabled in browser, or used something like Lynx, the site still worked.

In JS, NaN is a number and is not equal to itself.

Yeah, it is. Pity onto those who use it outside of a browser. The only reason to use it is lack of any other option.
You can delude yourself into thinking that a hacked together pile of dogshit made in a week for netscape is good. Even with ES5 and ES6, it's not.

it's a huge cuckload of nuggr balls

...

who gives a shit about arithmetic correctness nowadays

I don't know whether to cry or whether to laugh.

That's IEEE754 compliance for you. NaN≠NaN. It makes sense too as NaN is represented by the maximum exponent and a non-zero mantissa, which gives you a good 23+ bits of entropy with which to make all NaNs different. It's the same in C and every other language exposing the wonders of floating point numbers.

n/0=inf for n>0
n/0=-inf for n

Or memory usage.

I want all dynamic typing to disappear. Make programming great again.

Pajeet, please.

Any language that lets you do this by default is garbage.
jsfuck.com/

Not every language does that even though IEEE hardware does it. Not many languages give you control over the overflow and carry flags (assuming the CPU has them) for integers either.

When life gives you lemonade, trade it up for lemons.

Yes it is.

And anyone who uses it outside of a browser (where there's no choice but to use it) is a fool and a hack.

JS is non-free and insecure as shit. Have yet to see an JS engine that isn't slow and over-engineered as shit. JS is a security nightmare.

False. The standard is open and most of engines respect your 4 software freedoms.

False, one has to go out of their way to write insecure code. And you can't even do 'eval' under strict mode.

karlheinzniebuhr.github.io/en/2015/09/28/C-vs-Go-vs-pypy-vs-Python/
V8 is fast as fuck, you should get to know stuff before commenting on them so veementely.

I used to hate JS. It's a shitty language all around, the DOM API is all retarded and anything outside that is done differently by each browser so you have to constantly write equivalent stuff twice or thrice. Then I had to write PHP, and I can say becoming a backend webdev was probably a bad career choice. I can't wait to do embedded programming like all the cool memesters here. :^)

JS has some really dumb stuff, but it also has some nice thing. For example, functions as first class objects, closures, the "recursive" code structure in which everything can be described as a closure inside a closure, total control over scope with the recent let keyword addition (I still wish global wasn't the default, though)... among the bad bits, the fact that strict mode isn't the default, for example, and also that basic JS' idea of "concurrency" (it is actually single threaded) is all retarded.

Strict mode is the default inside modules, so we are getting there eventually.

this is part of the problem actually. is sed bad because you can't use it to make videogames?

Create a text file the size ou your terminal and cat it every 16 ms. Use sed to modify this file by changing in place the ASCII inside. Tadah! A video game rendering engine powered by sed.

how about the solution to how js is inherently insecure and cannot be trusted to run without heavily restricting it

ncurses or bust. Printing shit with cat constantly will only make your shit look like a slideshow.

How so? Type safety?

Most of the JS exploits you find on the Internet are just browser developers being retarded and not programming their shit properly.

You can't and that is no fault of JS. If all websites ran C, you would still need to heavily restrict it, because you are running untrusted code downloaded from some random site, written by god knows who.

I would argue running C would even be worse from a security standpoint, specially if it comes compiled (although that would be a really, really stupid idea in every regard).

That is excatly what WebAssembly will be and of course it's sandboxed.

wasm is supposed to be a virtual machine much in the way the JVM works, right? If that's the case, then it's not that bad; it's relatively easy to sandbox such a low level language.

Problem would be compiling directly to bare metal. Not only would you have to start supporting different browsers, but also different architectures, which would make webdev the most painful and tedious development job ever made, not to mention all the possible fucky exploits you could do with that.

Java != JavaScript