Hi,

I agree that "@" and "self." are very minor syntactic choice.  Even when
the object itself is passed as the first argument into an object method I
have no big problem with that.  The biggest problem for me is that in
Python an object is pretty much like a hash; this is equivalent as having
all data members as public in C++.  (Sure, there is a way around this in
Python, but it has to be manually made by the programmer, not built-in in
the language itself.)  In Ruby, on the other hand, all data members are
private by default (which is the recommended practice in C++), unless we
explicitly make it otherwise (through the accessor methods).  Therefore we
have a standard information hiding in Ruby and not at all in Python.  This
is one of the most important reasons why I switched from Python to Ruby.

Regards,

Bill
========================================================================
Paul Prescod <paulp / prescod.net> wrote:
> It's a minor syntactic choice that hardly has any large-scale effects
> either positive or negative. IIRC, Ruby uses "@" so you do a search and
> replace for "@" to "self." and you add "self." to your method declarations
> and you are done. I would not see that as the basis to switch from one
> language to another but your mileage may vary. Python's way may feel
> hackish to Ruby people, but Ruby's addition of "extra" syntax feels
> hackish to Python people.