Live data from Hacker News

Concepts to help developers master JavaScript

github.com

41–50 of 54 posts

Re: Concepts to help developers master JavaScript

#41
post #17

Earlier quoted context omitted.

This is what I try to convey to a lot of people who keep making jokes about JavaScript being unpredictable and hard to program. Just like everything else (especially programming languages), you are limited by your understanding of the concepts. It's only as difficult as you make it. I think so many people think of it as a toy, never bother to actually learn how it works, and assume everything either does or should wo…

>you are limited by your understanding of the concepts. It's only as difficult as you make it. I disagree. It is very possible to understand a concept fully, but for it still to be hard. E.g. pointers are quite easy to grasp the concept of, but also very easy to mess up. A more related example would be JavaScript's type coercion. Just understanding it, doesn't make it easy to avoid overlooking places it will cause pr…

[deleted]

Re: Concepts to help developers master JavaScript

#42
post #17

Earlier quoted context omitted.

This is what I try to convey to a lot of people who keep making jokes about JavaScript being unpredictable and hard to program. Just like everything else (especially programming languages), you are limited by your understanding of the concepts. It's only as difficult as you make it. I think so many people think of it as a toy, never bother to actually learn how it works, and assume everything either does or should wo…

We're migrating an app from Ruby to NodeJS, and I keep hoping it'll get better, but everywhere I look, from the inconsistency and constant shifting of language semantics to the immaturity of the ecosystem, and how the former practically enshrines the latter, I can confidently state that Javascript is an objectively worse language. Attempts to solve problems caused by Javascript only make the whole thing worse. At the…

I learned to embrace platform languages, regardless how I might feel about them.

Not having to deal with extra debugging layers, lesser debugging tools and additional manual FFI is much more productive than whatever I might gain in syntax/semantics of the "compile-to" language.

Re: Concepts to help developers master JavaScript

#43
post #9
post #4

Earlier quoted context omitted.

As opposed to what other language?

Not GP but variable scope in JS is very different to e.g. C, C#, Java etc. Superficially it appears similar, but the syntax is a faux amis.

Is is very similar to Lisp, Clipper or Perl, also known in CS circles as dynamic scope variables.

Re: Concepts to help developers master JavaScript

#44
I wish everything on this list fell under the "JavaScript" umbrella, but really they're all conditional on which version of "JavaScript" you're trying to master. Eg "vanilla" js, ES5, ES6, etc. So it's hard to know what came when and what you can actually use in the project you might be working in/creating.

Re: Concepts to help developers master JavaScript

#45
post #17

Earlier quoted context omitted.

This is what I try to convey to a lot of people who keep making jokes about JavaScript being unpredictable and hard to program. Just like everything else (especially programming languages), you are limited by your understanding of the concepts. It's only as difficult as you make it. I think so many people think of it as a toy, never bother to actually learn how it works, and assume everything either does or should wo…

We're migrating an app from Ruby to NodeJS, and I keep hoping it'll get better, but everywhere I look, from the inconsistency and constant shifting of language semantics to the immaturity of the ecosystem, and how the former practically enshrines the latter, I can confidently state that Javascript is an objectively worse language. Attempts to solve problems caused by Javascript only make the whole thing worse. At the…

Node is identical to Ruby in all these ways. How man Ruby gems no longer exist that countless web apps used to depend on? How many backwards incompatible changes has Rails made?

Re: Concepts to help developers master JavaScript

#46
post #17
post #3

What got me to love JS was probably learning about variable scope, closures, and async programming.

This is what I try to convey to a lot of people who keep making jokes about JavaScript being unpredictable and hard to program. Just like everything else (especially programming languages), you are limited by your understanding of the concepts. It's only as difficult as you make it. I think so many people think of it as a toy, never bother to actually learn how it works, and assume everything either does or should wo…

"Just like everything else (especially programming languages), you are limited by your understanding of the concepts. It's only as difficult as you make it."

No - JS is a special beast. Because it's designed from a simple hack on up, by distributed committee, with so many implementations ...

it's inherently problematic.

Foremost - when you say 'JavaScript' what does that even mean? Even different JS versions are implemented slightly differently with some containing features, others not.

It's this tedious, byzantine aspect of JS that makes learning it actually hard, because it's like walking on shifting sand.

At least with Java (and most other languages), there is usually one answer however bad or good, usually you know where you stand.

Re: Concepts to help developers master JavaScript

#47

One intuition I’ve had while learning Elm is that it’s a fundamentally simpler language with a smaller number of concepts to learn than JavaScript. In this list of 33 JavaScript concepts, I count 11 that either do not exist in Elm or, like Object.assign, do not have an alternative to worry about: No reference types No type coercion No == vs ===, although typeof has a simpler equivalent Basically all expressions and n…

> No == vs ===, although typeof has a simpler equivalent Sure, but elm has its own issues with comparison as these are essentially implemented as a compiler hack, and only comparable (ie primitive or lists/tulles thereof) types can be used as keys for the built in map type (so you need to know about primitive types too)

I'm sorry, but any language that has to rely on "===" to know what's in what is usually fundamentally screwed up. (Yes, I'll probably get downvoted for this. Oh well, truth often ain't popular.)

Re: Concepts to help developers master JavaScript

#48
post #9
post #4

Earlier quoted context omitted.

As opposed to what other language?

Not GP but variable scope in JS is very different to e.g. C, C#, Java etc. Superficially it appears similar, but the syntax is a faux amis.

JS's scope is really weird

    for (let i = 0; i != 3; i += 1) {
        console.log(i); // i refers to the variable defined below
        const i = 0;
    }

Re: Concepts to help developers master JavaScript

#49
post #20

One intuition I’ve had while learning Elm is that it’s a fundamentally simpler language with a smaller number of concepts to learn than JavaScript. In this list of 33 JavaScript concepts, I count 11 that either do not exist in Elm or, like Object.assign, do not have an alternative to worry about: No reference types No type coercion No == vs ===, although typeof has a simpler equivalent Basically all expressions and n…

You don't need all of these concepts on an everyday basis. If you don't use ES5 stuff that was replaced in newer versions, things get much simpler. let, =>, === etc.

Despite the submitted title containing "to help developers master", the actual Github page title contains "every JavaScript developer should know."

I think that casts this post in a different light. If the repo's intent is that "every JS developer should know" everything on this list, the context of this discussion changes.

Re: Concepts to help developers master JavaScript

#50
post #3

What got me to love JS was probably learning about variable scope, closures, and async programming.

Those features are hardly exclusive to javascript. Why did they made you love javascript but not any of the myriad of languages that support those features?

Embarrassingly enough I had programmed for many years before understanding those concepts. I only knew them instinctively. Coming from a multi-threaded web framework background, writing heavily async code was painful. But it became so simple after learning about closures and lexical scope, and that's why I consider them to be JavaScript's main features, even though almost all other languages have them too. The main reason why I haven't moved on to another language is that I get PTSD (from maintaining multi threaded code with global variables) - when I see a variable or function that I don't know where it comes from, which is common in languages that does not support lexical scoped named imports.
Post reply on HN