Why the 'self' argument?
Terry Reedy
tjreedy at udel.edu
Tue Sep 9 11:47:36 EDT 2003
"John Roth" <newsgroups at jhrothjr.com> wrote in message
news:vlrfohfp908qd7 at news.supernews.com...
>
> "Terry Reedy" <tjreedy at udel.edu> wrote in message
> news:rKadnXfgmJJdosCiXTWJiQ at comcast.com...
> > #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.
Completely central in that the type of functions *is* a curried type
(in the *MLs I have looked at). For instance, the type of a binary
int function is displayed something like:
func(int)==>func(int)==>int
with ==> associative right to left. The type of f(i,j)=>int is 'a
function (of i) returning [a function (of j) returning an int]'. As I
said, takes some adjustment for most. But occasional mental exercise
like this is probably good for the brain.
Terry J. Reedy
More information about the Python-list
mailing list