[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Easy object slot access in 5.2
- From: "William C. Bubel" <wcbubel@...>
- Date: Mon, 21 Nov 2011 20:55:02 -0500
On 11/21/2011 06:26 PM, Tony Finch wrote:
> Mark Hamburg <email@example.com> wrote:
>> Cute. I used to dislike this sort of thing, but it has a certain amount
>> of resonance and leads to thoughts like the following:
> I was thinking of languages like Smalltalk, C++, Java, etc, that allow you
> to refer to instance variables without having to prefix with this or self.
> Not sure if this is a good example to copy, though!
Not to change subject, but I'm a fan of the Ruby/Coffeescript @
operator, which is sugar for self. @member and @method() both do what
you'd expect it to. It felt like the happiest medium between not having
to use the this keyword in c++, and having to prefix everything with
self in python.