DEV Community

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

Collapse
 
markerikson profile image
Mark Erikson

My first programming course was an Engineering-track "Intro to C++" class, back in 2000, as part of a CS major.

If I remember right, we didn't even touch pointers in that class - they were covered in the second course, "Object-Oriented Programming with C++".

I think pointers are a valuable concept to understand for anyone doing programming.

At the same time, I wouldn't teach C++ as a first language to anyone getting started today - I'd go with JS or Python. Along with that, no, I'd never try to throw a beginning programmer straight into pointers.

I do see some value in trying to cover something sorta-kinda like this somewhere in the process. After all, "references" in JS, Java, Python, and C# are just pointers that have been hidden a bit so you can't modify them yourself, and it's certainly important to know that this code:

let a = [];
let b = ;
Enter fullscreen mode Exit fullscreen mode

just creates two variables pointing at the same array in memory.

Mmm... I'm actually kinda talking myself back and forth on this one a bit here as I write :)

Eh... if we're going to stretch the definition of "pointer" to "references in GC-based languages", then yes, I can see the importance of covering that at some point in the semi-early-ish learning process.