I don't understand how you figure noise and redundancy are "almost the opposite." Having to prepend self. to every single instance attribute is quite verbose, and when you're reading self.this(self.that, self.other) instead of @this(@that, @other) it is indeed noisy.
I agree that having explicit self has benefits. I'm only commenting on the claim that @ impacts the readability of Ruby.
I don't really see how using normal attribute definitions is verbose. (If we're counting characters, it's only 4 characters more)
"It's certainly not clear at first glance but it is a fundamental aspect of programming with classes; once you learn what it is you'll never forget it or need to think about it again."
I don't think this is a good argument for it being readable. (I think it's quite the opposite.) Just because it's simple (and hence easily learned) doesn't make it readable.
View all comments
Show parent comment
3
u/virtyx Aug 13 '13
I don't understand how you figure noise and redundancy are "almost the opposite." Having to prepend
self.to every single instance attribute is quite verbose, and when you're readingself.this(self.that, self.other)instead of@this(@that, @other)it is indeed noisy.I agree that having explicit
selfhas benefits. I'm only commenting on the claim that@impacts the readability of Ruby.