JavaScript in 2018

It's been a few years since I've taken a look at the language. Fill me in. Is JavaScript still fucked?

Attached: 7g5exjmat7x01.jpg (460x613, 147K)

Other urls found in this thread:

typescriptlang.org/
twitter.com/SFWRedditVideos

ES6 really made it worth using in my opinion.

Attached: 1525465148219.jpg (3264x1836, 832K)

Getting rid of var and arrow function syntax has made it much sexier and functional.

That's not even the best part, all the Array.prototype.* additions like map and reduce changed the fucking game, man. Promises too. ESNext is going to kick ass with all the things entering stage 4.

>much sexier and functional.
Could it be considered a functional programming language now?

>using vanilla JavaScript

Attached: year.jpg (474x355, 25K)

>ES6 really made it worth using in my opinion.
Why?

Attached: 14676729_358966594443166_3743112638968627200_n.jpg (1080x1080, 56K)

It's a decent language. Still has some quirks here and there but overall it's good.

no, it got unfucked by william gates typescriptlang.org/

JS has always been multi paradigm

shame you can't use any of that shit if you're actually supporting older browsers

What's up with the monkey feet?

Yes it is still fucked, abet less so now thanks to ES6. Even with some of the improvements you get from ES6, which you may not even get to use if you have to support odder browsers or versions of node, it is still a horrendous language. The fucking obnoxious over use of anonymous functions and call back functions is really what kills it for me.

Attached: 1505791393354.png (850x464, 678K)

everything frontend uses babel and/or webpack nowadays. node also supports es6 features since a couple of major versions without any need for transpiling.

>ES6
>callbacks
how do I know you don't actually know the language?

js now looks like
async _=> {
await dick;
return jizz;
}

we have typescript, reasonml, clojurescript and a lot of other languages now that compile to JS

WASM might be a thing soon(TM)

npm just werks but is bloated

all in all I think JS is maturing.

you need more promises in your life

also, there're these things called transpilers and polyfills.

I never said you had to use callbacks with ES6 since it introduced promises, those are still somewhat shitty. It doesn't help that most code you run across still uses old pre ES6 practices since it was written by some fuckwit that couldn't be bothered to read up on ES6 or because you need to support some shitty old web browser or Node. But I guess I shouldn't be surprised that a JS user would have shit reading comprehension.

Attached: 1508704976546.gif (480x270, 3.23M)

It's minimally less fucked than Python now.
>you need more promises in your life
>also, there're these things called transpilers and polyfills.
And all of those things are trash-tier workarounds.

>Try to do anything remotely complicated in JavaScript
>"Hmm this is a little tricky. Let me look online and see what the standard way of doing this in JavaScript is"
>Almost every answer online is some variation of "idk but you can download this library and it should do it"
I WANT THIS TO WORK WITHOUT IMPORTING 7 LIBRARIES YOU DUMBFUCKS

>most code you run across still uses old pre ES6
maybe if you create wordpress themes for a living

also, you should read up on async/await, that shit has been supported since node 8...

Why are promises trash?

>use features today that will be supported in a few years
>specify which browser versions to target
>once browsers reach feature parity just throw out the toolchain and it all continues working

yeah, gotta hate those trash-tier workarounds

Not the guy you are responding to, but while promises seem like a more straight forward and better alternative to call back functions, under the hood they can use up a lot of resources very quickly if you are not careful, which most web developers / JS brainlets aren't.

Hmm a language that has such a shitty implementation and coordination of specifications that you need to transpile said language to another version of itself. I wonder anyone would think that is a trash work around.

Attached: 1511299462551.png (792x584, 1.01M)

Are you seriously blaming the language for vendors not complying asap with the standard?

Frontend development always has been a giant clusterfuck due to huge fragmentation and every browser vendor disrespecting the ECMA spec.
Please present a better alternative than transpilation/polyfills to ensuring consistent JS interpretation.
Oh wait, you're just a larping NEET :^)

it's not because of "a shitty implementation and coordination of specifications" but because a lot of people still use IE or memebrowsers like Edge or Firefox forks built on outdated versions

ES6 introduces a few modern features like unpacking/repacking arrays (a weak form of pattern matching). But overall ES6 tries to stay backwards compatible with things like the shitty C-style for/while loops. The iterator/mapping syntax in ES6 is really shitty because it just takes a high order function as its only parameter and so you are using a function to fake all the features that should be built into the language.

tl:dr were fucked if ES6 wins the JS-transpiler war, there are a lot better solutions, Coffeescript combines all the best features of Python, Ruby and Javascript. Dart is also good.

Vendors have implemented 99% of ES6 in the most recent browsers.

It's the users that are hold back progress. Lots of retard normies who don't upgrade their browsers.

Both the language and the libraries are giving a heaby emphasis on "functional Javascript". Personally, I'm not sure if it's actually better/more perfomant/easier to use, but at least people are defining best practices and frameworks that have some actual architectural thought into them.

It seems they're putting a lot of effort into the new versions at least.

>Could it be considered a functional programming language now?

>JS has always been multi paradigm

A language must meet certain requirements to be considered a functional programming language, no? I think they're asking if the new changes have crossed some kind of threshold for how you can use the language.

Attached: flat,800x800,075,f.jpg (800x800, 19K)

GNOME virus is spreading

Attached: postfeet2.png (535x559, 390K)

Javascript will always be an absolute mess of a language. "lmao just don't use the bad parts" sounds nice until you realize you can't stop other people from using them, often in code that you might need to use. The sole reason it is popular is because of the Internet industry boom.

Web development will always be shit until WebAssembly becomes commonly supported.

>Web development will always be shit until WebAssembly becomes commonly supported.
I've just read the Wikipedia article about it and I don't understand how Wasm can replace JS. Won't we still need JS? Can someone explain this to me?

Kind of, but it would make interacting with JS minimal. Being able to use other, better languages will rapidly deprecate JS as a legacy tool.

I still don't understand. How could you replicate what JavaScript does in the browser in C++?

>all these js fags
literally die

>using ANY libraries rather than just pure bleeding-edge ECMAScript

Attached: ugh.jpg (460x460, 31K)

Web Assembly compiles C and C++ to byte code for a virtual machine that runs inside the browser. There are plans to support other languages such as Go or Python too. You would only need JavaScript to embed the WASM in the page and then call it. I think WASM also has the ability to natively interact with the DOM too. Surprisingly WASM is already supported by all major browsers so technically there is nothing stopping someone from using it now.

Attached: 1511018286514.jpg (408x410, 17K)

>I think WASM also has the ability to natively interact with the DOM too
it doesn't

WASM has no support for SIMD instructions and is garbage in general. asm.js is where it's at, because it can get pretty fast (and I assume easily outperform WASM) with a good JIT.

Ah. Well that sucks. It still seems like a pretty cool idea.

Using vanilla javascript is christ-tier. I seriously dont understand what is so imposing about it that drives everyone to these autistic frameworks. You can build a one-way databinding library in 30 minutes and share it across all your projects if you need some magic template binding shit (or just grab something like RiotJS). Ajax calls, DOM manipulation and 3rd party library integration is infinitely easier with vanilla JS too. It just works.

ES6 is great.

- arrow functions
- const/ let
- es6 classes
- template literals/ multi-line strings
- import/ export

I know es6 classes are just sugar, but fuck it's so much easier to use.

Sometimes, it's not just browsers. Some companies use JS in the back-end via some lower-level language like C#/Java to process the script and fart out their compiled equivilances.

Is it still worth learning JavaScript if it will be replaced by Web Assembly?

Attached: webassembly-page-280.png (820x280, 41K)

Possibly. Depends on how it's implemented and the kind of learning curve devs will have to do to transition from JS to it. My guess is all languages are eventually going to hit a singularity with how we do everything, with very few exceptions.

Attached: programminghistory.jpg (5850x2246, 2.41M)

Pretty much this. Typescript is a major improvement.

Promises are ok. Why not do something like c#'s await though?

What will it even mean to be a "front-end web developer" if we're writing C++ for Web Assembly?

>But I guess I shouldn't be surprised that a JS user would have shit reading comprehension.

Idk... If I to read js ever day I'd have to be a good reader or I'd kill myself.

Hmmmmmmm the real questions of life.

If you have to ask youll never know.

>tattoos
Dropped.

This picture is fucking depressing. So much effort to go around town catching virtual monsters to (no doubt) sell the accounts and earn a buck. Meanwhile there were people running 10 bots at a time for 24hrs/day, that were travelling the entire world and catching 1000s of stupid monsters without owners even paying attention.