Mailing List Archive


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

Re: [tlug] ruby and python in Japan





On 2/26/07, Stephen J. Turnbull <stephen@??> wrote:
Zev Blut writes:

> On Mon, 26 Feb 2007 13:33:17 +0900, Stephen J. Turnbull
> <stephen@??> wrote:
>
> > Zev Blut writes:
> >
> >  > Well, this is not restrictive but an annoying aspect is that you must
> >  > explicitly declare self in all of your instance methods.  It makes the
> >  > OO aspect of Python feel tacked on.
> >
> > Ah, you haven't drunk the Kool-Aid.  This is an instance of "explicit
> > is better than implicit."  I think you should check your mental model
> > of OO.  I'm not saying that your annoyance is unwarranted---whatever
> > makes you more productive works for me.  My point is that OO and
> > implicit arguments are independent constructs.
>
> I am sorry but I must disagree, this simply reeks of an implementation
> detail.

Well, that's exactly *my* point.  It's not that this couldn't have
been added (subtracted?) to the language, it was a deliberate choice.

well then why wasn't it ? Given that a large part of whats good about python is what you don't have to declare ( the types of parameters to functions for example ) what possible benefit is gained from forcing the programmer to explicitly name a self variable for every member function ? Ruby's @example.com notation seems far more convenient for this.





Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links