lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On 11/21/2011 06:26 PM, Tony Finch wrote:
> Mark Hamburg <> 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.