DEV Community

Discussion on: Do they teach "pointers" in bootcamp? Should they?

Collapse
 
yechielk profile image
Yechiel Kalmenson

When I was in bootcamp, we didn't learn about pointers per se, because the languages we learned (Ruby and JavaScript) didn't have pointers, but I do remember learning about the difference between passing by reference and passing by value, so when I learned Go and it came to pointers, the concepts were familiar to me.

Collapse
 
waynejwerner profile image
Wayne Werner

In every high level language you're going to have the idea of references, like in JS if you do

thing = {"foo": "bar"};
a = thing;
b = thing;
a.foo = 42;
console.log(b.foo);
Enter fullscreen mode Exit fullscreen mode

If you understand that you'll see 42, then you understand pointers.

Collapse
 
liaowow profile image
Annie Liao

This code snippet reminded me of a mental model I acquired from Dan Abramov via his Just JavaScript newsletter, where we learned to literally "draw" pointers to understand the concept of references in JS.