News for hackers. Stuff that matters.
Re:A Modern JavaScript Tutorial by hutzlibu on Monday December 07, 2020 @01:01PM (#25334876)
"Just like it's better to understand how prototypal inheritance works in JS BEFORE even using a single class declaration. "

About that, does JS class inheritance now work like classes in java for example? Or is it still just syntactic sugar for the prototype inheritance? By your wording, I assume the later?

Re:A Modern JavaScript Tutorial by ragnese on Monday December 07, 2020 @01:55PM (#25335669)
Correct. It's still prototype based. Thus making the class keyword actually MORE confusing for people from other languages, IMO.
Re:A Modern JavaScript Tutorial by wa1987 on Monday December 07, 2020 @01:34PM (#25335375)
Re:A Modern JavaScript Tutorial by hutzlibu on Monday December 07, 2020 @01:50PM (#25335591)
Wow. I was hoping, at some point things would improve a bit.
Re:A Modern JavaScript Tutorial by wa1987 on Monday December 07, 2020 @01:57PM (#25335692)
Agreed. I find myself using a pretty small subset of the language which definitely doesn't include the class keyword. Doubt I'll ever find it useful.
Re:A Modern JavaScript Tutorial by hutzlibu on Monday December 07, 2020 @02:25PM (#25336035)
Yeah, like many people, I ended up making my own inheritance routines. Then when class came out, I was half rejoicing, half regretting to put up the work. But well, no thanks. I rather keep using my own far from perfect way of things.