currying at language level (was: Re: add_command)
holger krekel
pyth at devel.trillke.net
Tue May 14 05:40:23 EDT 2002
Alex Martelli wrote:
> On Monday 13 May 2002 19:31, holger krekel wrote:
> > Alex Martelli wrote:
> > > I'd love to have built-in currying, but the syntax
> > > sugar you propose is clearly too limited (e.g., how
> > > does it apply to keyword-arguments?)
> >
> > does it need to? IOW what problems do you expect?
>
> I expect a language that doesn't treat named arguments
> as 'first class' (==just as important as positional ones) in
> SOME but not ALL cases. Isn't that absolutely obvious?!
This doesn't make it obvious to me. I guess you mean that
curring with named arguments should work as well?! Then i would
probably say that 'arg1=***' could be allowed also...
please note that i started this discussion with:
"alex, what do you think about ...", NOT with
"hey all, I have a PEP language change proposal".
And that was precisely because i thought i might be
on the path to all evil and that it would be easy for you
to point it out.
> The 'orthogonality' of Python is #1 key to its power AND
> simplicity. You need mighty powerful arguments indeed
> for BREAKING orthogonal, uniform behavior, as should
> be self-evident.
i didn't intend to break orthogonality as might be evident.
if you simply show the non-orthogonality that would be enough.
But as Paul Foley already pointed out, today's lambdas in
combination with lexical scoping offer a good way for
most 'prebinding' wishes, so further discussion does not
seem to make much sense.
Additionally, i should not have talked so much about currying
as 'prebinding' was what i actually meant.
thanks for your answers,
holger
More information about the Python-list
mailing list