UserLinux chooses Python as "interpretive language" of choice

John Roth newsgroups at jhrothjr.com
Sat Dec 20 12:49:33 EST 2003


"Skip Montanaro" <skip at pobox.com> wrote in message
news:mailman.374.1071937108.9307.python-list at python.org...
>
>
> Python's design doesn't admit the option of calling functions without the
> parens.  Perl's and Ruby's do.  On the other hand, functions are
first-class
> objects in Python.  I don't know about Ruby, but in Perl, whether or not a
> function is called or treated as a piece of data is very
context-dependent,
> to the point of near madness for people like myself who don't use it day
in
> and day out.

That's one of the reasons it was a rather bad choice of example.
As far as I can tell, it would be quite hard to do in any comprehensible
fashion, and not backward compatible.

>
>     John> The jihad against the "functional" builtins is a good case in
>     John> point.  The replacements for apply, map and filter seem to be
>     John> adequate, and in the case of list comprehensions, pretty darned
>     John> useful although I think that it's a rather baroque addition to
an
>     John> otherwise very clear and comprehensible language.
>
> Why do you call it a "jihad"?  Guido has stated on multiple occasions that
> he regretted adding functional constructs to the language.  I still can't
> get to the Python website (have to wait another two hours for my ISP to
> reload its tables), but here's a Google pointer to an HTML-ized version of
> his OSCON 2002 Powerpoint slides:
>
>
http://216.239.41.104/search?q=cache:2QztD1KncJgJ:www.python.org/doc/essays/ppt/regrets/PythonRegrets.ppt+OSCON+%22python+regrets%22&hl=en&ie=UTF-8

I've read it before. I'm in complete agreement that the replacement
for apply makes the lanugage cleaner, and I've no particular objection
to list comprehensions replacing map and filter.

>     John> There is no replacement for lambda in sight, even though lambda
is
>     John> arguably the ***largest single*** one of the functional
constructs
>     John> that needs work, and has obviously needed work for a long time.
>
> Once again, you desire Python to be something it is not.  If you want a
> strong functional language, program in Lisp or Haskell.
>
>     John> The obvious replacement for lambda, which is some form of inline
>     John> block, has not been seriously discussed, with proposed syntax
and
>     John> examples, anywhere I've seen it. Clearly, I'm not ominiscient,
so
>     John> that doesn't mean it hasn't, though.
>
> Anonymous blocks are not a replacement for lambdas, named functions are.
> How do you pass parameters to an anonymous block?

By putting them in the first line. Again, I'm not a language purist, and
if the term 'block' means something to someone that causes confusion,
then I regret it.

Frankly, I don't think that anyone is going to come up with the ideal
syntax for anonymous functions. The thing that becomes more and
more apparent every time I think of it is that one of Python's real
strengths,
it's automatic indentation, also makes it very hard to incorporate statement
syntax within expressions.

> You seem to have a burr under your saddle about this stuff.  I'm not sure
> why.  Maybe it's time to get out the curry comb.

The world changes, and ideas that seemed to be perfectly appropriate
five or ten years ago may no longer be such. Small languages with a limited
audience have a perfect right to be as quirky or as "pure" as their authors
want. Once they get beyond that point, there's a bit of social
responsibility
involved in addressing common problems.

John Roth
>
> Skip
>






More information about the Python-list mailing list