Hacker News new | ask | show | jobs
by jMyles 4209 days ago
There's something to be said about the distinction between "this" and "self" as names for the self-referential instance object. While "self" emphasizes mutability and introspection, "this" evokes a more material, evidentiary abstraction.

When I transitioned from PHP to Python, the change in nomenclature (albeit only a social norm in Python) was a big part of what helped me think bigger about this concept.

To this point, this read might have been easier to digest had it started with the section "object this."

1 comments

I personally don't find the terminology has much significance; it wouldn't matter if it was named "the", "this", "it", "my", or "object", it all refers to "the object instance upon which this method is invoked".

Maybe it's just because I'm familiar with C where the equivalent of a "this" reference often has a different name depending on the "class", e.g. "struct Window * w" or "struct Button * b".