Live data from Hacker News

Eloquent JavaScript 4th edition (2024)

eloquentjavascript.net

111–120 of 249 posts

Re: Eloquent JavaScript 4th edition (2024)

#112
post #38

This is, in my opinion, the book to use to learn JavaScript at more than a surface level. The only other materials I recommend as much (but for a different level of learner) are the “You don’t know JavaScript” in-depth book series. In 2015, I was consulting for a distance learning program, administered by a major California University, that wanted to replace their current textbook (one of those “Head First” O’Reilly…

If you want a video series that accomplishes a lot of the content in these books it's Will Sentance's Javascript: The Hard Parts.

Cheers Josh :)

Re: Eloquent JavaScript 4th edition (2024)

#113

Earlier quoted context omitted.

I agree. Have you also read "JavaScript: The Good Parts" ?

nope, looks like a deep cut and will fill in some knowledge gaps i have. thanks for the rec. another good one for my learning was "secrets of the javascript ninja"

Secrets of the Javascript Ninja is my favorite JS book by far.

Re: Eloquent JavaScript 4th edition (2024)

#116

I don't mean to throw shade on the whole book, but I don't think the section on errors takes things in the right direction. A distinction should be made between errors and exceptions. In JavaScript and many languages, we conflate the two and use exception handling as logic flow control. In my experience, this can end up being a headache and encourage unnecessarily weird structuring of code. Look at this example from…

In other languages like Java this can work because of checked exceptions (can work, I know there are a lot of mediocre devs who don't know what to do with checked exceptions but that's another issue). But in JS this is a terrible way to deal with any problem that can be handled.

Re: Eloquent JavaScript 4th edition (2024)

#117
post #48
post #36

Earlier quoted context omitted.

TypeScript isn't really a "compile-to-JavaScript" language in the same way that, say, Rescript is. Modulo a few corner cases (e.g. enums) which are now considered anti-features, TypeScript has the exact same runtime semantics as JavaScript - you can (almost) convert TypeScript to JavaScript just by stripping away the type annotations (and, if various ECMAScript proposals go through, you won't even need to do even tha…

I guess by that same definition, Coffeescript isn't a compile-to-JavaScript language either, as it has the same semantics as vanilla JavaScript? I think that's besides the point. My point was more that people who are supposed to learn JavaScript, should do so by learning vanilla JavaScript first, then they can move on to learning whatever is currently hyped by the zeitgeist (which happens to be TypeScript currently).

CoffeeScript has quite a lot of code generation features, while TypeScript largely just removes code in order to transpile to JavaScript. The only exception I can think of is enums, and I suspect they wouldn't have put those in if they had it all to do over again.

Re: Eloquent JavaScript 4th edition (2024)

#120
The one odd thing in it is that it still claims SVG markup needs a namespace. Which it doesn't, SVG became part of the HTML5 spec and emphatically should _not_ use namespaces when used as "just another element" inside an HTML document.

(even though you do need a namespace when creating svg elements through createElementNS, both "of course" and "unfortunately", and of course you need namespaces if you're creating an actual stand-alone SVG document)

Post reply on HN