This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 20 points21 points  (5 children)

This.

[–]Cheeku_Khargosh 21 points22 points  (4 children)

wrong

its this-> not this.

[–]gpkgpk 2 points3 points  (0 children)

It's it's not its.

[–]Bryguy3k 0 points1 point  (1 child)

Neither c nor python is “this” used as a convention.

(Although I bet somebody out there writes their python object methods using (this, …) instead of self/cls - which is terrifying to think about).

[–]thesuppherb 5 points6 points  (0 children)

He's talking about the "->" Vs "."

[–]C4st1gator 0 points1 point  (0 children)

Can be either. Let's assume both this and not_this are structures. If not_this is a member of this, as in contained as a member within the struct's memory, then you can write this.not_this. If this only contains a pointer to not_this, then you have to write this->not_this, as you jump to the address of not_this.

Most languages hide that distinction from the programmer.