<p>I hate giving advice like this, but my honest advice here would be not to do so.  Or, at least, don't do it without consulting with your colleagues first.</p>
<p>Students (and your fellow teachers in future courses) depend on you getting through the required material in the course.  If you find that you have extra time at the end of the semester, then by all means, go back and try to take a stab at smart pointers.  But I wouldn't endanger your odds of getting to the end of the material that students will be expected to know in future coursework.  That could create far larger problems for the students going forward.</p>

CC BY-SA 4.0
2021-01-25T16:56:39.343Z
2021-01-25T16:56:39.343Z
Ben I.
<p>I have to teach an Intro to Programming class of students with some exposure to proccedural programming, arrays and loops etc. However, they have not taken any course in oop and templates. It is a requirement of the course to teach pointers. I felt teaching raw pointers only will be incomplete; it is appropriate to provide the students a fuller, mordern C++ Intro wrt pointers. This implies teaching smart pointers.</p>
<p>How do you explain the syntax of smart ptrs to these students without having to teach them first about classes, constructors &amp; destructors dynamic memory and templates?</p>

CC BY-SA 4.0
2021-01-25T04:29:30.750Z
Smart pointers are a device to manage the automatic destruction of dynamically allocated objects... Talking about objects first seems unavoidable
Michel Billaud
CC BY-SA 4.0
2021-01-25T15:50:12.117Z
If you have an established curriculum and/or textbook, I'd advise not going off on a totally different path from their sequence and scaffolding. The work to support and make it coherent may snowball surprisingly fast for you. Let some textbook maker do this switch first.
Daniel R. Collins
CC BY-SA 4.0
2021-01-27T16:15:47.410Z
From what I remember the implementation in OO and or templates. But the usage is not. Therefore focus on the usage. Or even better, don't (I agree with Ben).
ctrl-alt-delor
CC BY-SA 4.0
2021-01-29T20:41:15.487Z
Yes, I can see now this may be not be the best course to follow. Heading your advises. Thanks folks & @Ben I. for the answer.
Mallam Awal
<teaching-analogy><c++><pointers>
Teach smart pointers to beginners with no knowlege of OOP or templates
# Teach smart pointers to beginners with no knowlege of OOP or templates

(Asked by: username_0 on 2021-01-24)

I have to teach an Intro to Programming class of students with some exposure to proccedural programming, arrays and loops etc. However, they have not taken any course in oop and templates. It is a requirement of the course to teach pointers. I felt teaching raw pointers only will be incomplete; it is appropriate to provide the students a fuller, mordern C++ Intro wrt pointers. This implies teaching smart pointers.

How do you explain the syntax of smart ptrs to these students without having to teach them first about classes, constructors & destructors dynamic memory and templates?

**Tags:** teaching-analogy, c++, pointers

> **Comments:**
> **username_1**: Smart pointers are a device to manage the automatic destruction of dynamically allocated objects... Talking about objects first seems unavoidable  
> **username_2**: If you have an established curriculum and/or textbook, I'd advise not going off on a totally different path from their sequence and scaffolding. The work to support and make it coherent may snowball surprisingly fast for you. Let some textbook maker do this switch first.  
> **username_3**: From what I remember the implementation in OO and or templates. But the usage is not. Therefore focus on the usage. Or even better, don't (I agree with Ben).  
> **username_0**: Yes, I can see now this may be not be the best course to follow. Heading your advises. Thanks folks & @username_4 for the answer.  

---

## 1 answers

### Answer by username_4 on 2021-01-25. Score: 3

I hate giving advice like this, but my honest advice here would be not to do so. Or, at least, don't do it without consulting with your colleagues first.

Students (and your fellow teachers in future courses) depend on you getting through the required material in the course. If you find that you have extra time at the end of the semester, then by all means, go back and try to take a stab at smart pointers. But I wouldn't endanger your odds of getting to the end of the material that students will be expected to know in future coursework. That could create far larger problems for the students going forward.


---

