Why the 'self' argument?

John Roth newsgroups at jhrothjr.com
Tue Sep 9 07:52:57 EDT 2003


"Terry Reedy" <tjreedy at udel.edu> wrote in message
news:rKadnXfgmJJdosCiXTWJiQ at comcast.com...
>
> "John Roth" <newsgroups at jhrothjr.com> wrote in message
> news:vlpr14kfehrn46 at news.supernews.com...
> > It's not a simple thing to do, and the fact that ML
> > family languages manage to do it without having
> > to have explicit type declarations (well, most of the
> > time anyway) is a major achievement, IMO.
>
> As I remember, part of the cost (for ML at least) is having separate
> operators for ints and floats.

As well as separate operators for a number of other things. This
isn't unique to ML, though. For other reasons, Perl has a seperate
set of operators for string versus numeric comparisons, and even
Python has separate operators for division.

> Bye bye generic functions.

Actually, they seem to be able to have generic functions, at least
in some restricted cases.

> I don't
> remember if there was any escape from the type straightjacket (like
> #define max(a,b) ... in C).  And one has to adjust to and feel
> comfortable enough with the view that multiparam functions are a
> composition of single param functions.

I'm not sure how central currying is to the type inference
mechanism.

> But I agree that the type
> inferencing is an interesting achievement.

Yes, it is. That is, I think, my point. If we want to have some
form of static typing and still keep Python reasonably close to the
streamlined language we all know and love, this seems like an
interesting research direction.

John Roth

>
> Terry J. Reedy
>
>






More information about the Python-list mailing list