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:
leta=[];letb=;
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.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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:
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.