I think that on page 5, the definition of struct should state that we are talking about a C structure, not a C++ one. Indeed, the comparison between struct and class at the end of the page states that they are semantically equivalent (implying "in C++"), which maybe can create a bit of confusion for programmers who never used C++, since from the first two definitions it may look like a struct is "less powerful" than a class.
Here is an example of how I would rewrite the slide:
C Structure
...
C++ Structure/Class
...
struct vs. class in C++
...
Let me know what you think about it.
Moreover, I guess there is a typo in the comments on page 35. The second comment should be (2), not (21).
Last minor suggestion: it would probably be better if the verbs have the same form ((2) says initializes, but (1) and the last comment say allocate and call respectively).
Hi Federico,
I think that on page 5, the definition of
struct
should state that we are talking about a C structure, not a C++ one. Indeed, the comparison betweenstruct
andclass
at the end of the page states that they are semantically equivalent (implying "in C++"), which maybe can create a bit of confusion for programmers who never used C++, since from the first two definitions it may look like astruct
is "less powerful" than aclass
. Here is an example of how I would rewrite the slide:Let me know what you think about it.
Moreover, I guess there is a typo in the comments on page 35. The second comment should be (2), not (21). Last minor suggestion: it would probably be better if the verbs have the same form ((2) says initializes, but (1) and the last comment say allocate and call respectively).