Vincent Gable’s Blog

February 26, 2008

this is Confusing, self is Not

Filed under: C++,Objective-C,Programming,Usability | , ,
― Vincent Gable on February 26, 2008

Most diction decisions, like choosing the keyword nil over NULL seem inconsequential. Sure, n-i-l is probably faster to type then shift+n-u-l-l, but the difference is too small to matter. Both terms are clear.

However after today I’m convinced that the C++ convention of using the keyword this, over self, was a mistake. “This” is just too common of a pronoun. It’s too easy to say something like “..this is invalid..”, and leave people wondering if you meant that-this or self-this.

I’d be interested to know the reasoning behind choosing the ambiguous keyword “this” over the precedent “self”.

I plan to refer to “this” as “self” whenever possible for a time, to see if it’s less confusing, even to habitual C++ users.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress