r/programming • • Oct 03 '16

How it feels to learn Javascript in 2016 [x-post from /r/javascript]

https://medium.com/@jjperezaguinaga/how-it-feels-to-learn-javascript-in-2016-d3a717dd577f#.758uh588b
3.5k Upvotes

852 comments sorted by

View all comments

3

u/nebbly Oct 03 '16

I think at this point, when learning the frontend, it's probably a better idea to start learning something that compiles to javascript than javascript itself. Usually those languages (typescript, elm, purescript, etc.) have fewer caveats and are less scatterbrained. Beyond that, they probably won't suffer a big blow when WASM becomes mature, while javascript probably will.

10

u/[deleted] Oct 03 '16

Not if you're learning it to get a job.

0

u/nebbly Oct 03 '16

Depends. If the author's premise is accurate, you might be losing more time trying to learn JS than learning the basic principles of frontend development in another language. If you want to learn JS for a job, you also need to know about XHR, HTML, CSS, and other things not in and of JS itself. I'd more likely hire a candidate who has a solid understanding of front-end concepts and had used typescript, for example, than one who has learned the frontend in JS.

1

u/[deleted] Oct 04 '16

You obviously need both, but the comment I'm responding to was talking about "typescript, elm, purescript, etc.", not HTML and CSS.

4

u/flyingjam Oct 03 '16

Elm is a different enough language from JS that it has its own little ecosystem and compiler, but isn't Typescript still pretty heavily tied into the Javascript environment? It's even mentioned in the article as another layer of complexity.

3

u/CookieOfFortune Oct 03 '16

Yes Typescript is a superset of Javascript. But for a lot of people (including myself) it provides the right balance of sanity without deviating from the source material too much.

1

u/nebbly Oct 03 '16

Yeah, I guess that's true whenever you're doing interop with JS, which is inevitable on any decent-sized project. If you are able to only live in typescript land (unrealistic on a large project, but possible for learning), then I think it holds true.

A few advantages of TS are that at least it has one way to do imports, modules, etc. Compiler-aided development in TS is also nicer when learning, so you don't have to manually search for as many bugs. So I think in some ways, it does reduce mental load.

But I concede to your point that in many instances, yes it's another layer of complexity.

0

u/ActualContent Oct 03 '16

Typescript is really awesome. When it is working. It absolutely adds another layer of setup and complexity and you as a developer need to understand what it is doing in order to get it set up and working correctly. I think if someone is learning front end web dev for the first time, you can't beat plain old JS for this very reason. I will say that I think it is inevitable for people to transition to compile-to-JS languages nowadays and that for beginners that transition probably occurs earlier today than it ever has.

3

u/[deleted] Oct 04 '16

This is horrible advice.

2

u/ororoo Oct 04 '16

care to elaborate? I think his advice is solid, as js in browsers is pretty much transpiled from anything, and with wasm, this kind of use will increase.

2

u/[deleted] Oct 04 '16

Web Assembly adoption will take a long time. Plus there's tons of legacy code in vanilla JS, and we know JS itself is not going away for a long time to come. A strong base in the language will help the developer even when the framework du jour goes away, not to mention debugging issues when they arise.

-3

u/timeshifter_ Oct 03 '16

I think at this point, when learning the frontend, it's probably a better idea to start learning something that compiles to javascript than javascript itself.

Why do you hate maintainable code?