by sam0x17 · 5y ago · 0 comments
The key problem with js is the relationship between objects and functions is extremely confusing. You end up having to explain associative arrays, and spend 30+ minutes doing some hand-waving to even begin to describe what an object actually is in JavaScript. Then they get it. Contrast that with something like Java or even Rust where, despite the other complexities, it's pretty clear what the data is and how it is stored.
When you're teaching, you should be enabling the student to do one more thing that they couldn't do before. If you're spending 30+ minutes trying to explain what an object is, you're trying to do way too much. You don't need to have a 100% complete and correct understanding of Javascript's object model to use objects.
> Contrast that with something like Java or even Rust where, despite the other complexities, it's pretty clear what the data is and how it is stored.
That's nonsense. Particularly with Rust, now you're deep in the weeds of pointers, stack vs heap vs other segments, and borrow checking rules.
[1] helped design a JS class at Stanford for first-time programmers. Also designed an intro Rust class.