Debugging (was Re: Why not allow empty code blocks?)

Chris Angelico rosuav at gmail.com
Tue Aug 2 10:58:58 EDT 2016


On Tue, Aug 2, 2016 at 9:05 PM, BartC <bc at freeuk.com> wrote:
> I think the real reason is not willing to admit that the language lacks
> something that could actually be useful, and especially not to an upstart on
> usenet who is not even an expert in that language.

I know what features I miss from the languages I use most frequently.
Here, let me help you out a bit with some examples:

Python
- Support for live code reloads without restarting the process
- A more free-form declarative syntax for laying out GUI code
- Arbitrary-precision non-integers
- Convenient syntax for a few array/list manipulations
- Truly concurrent threads
- Extreme short-hand for executing external commands, the way REXX does

Pike
- Keyword arguments
- "obj in collection" syntax for membership testing
- Better documentation in places
- Out-of-the-box GTK support on OSX
- As with Python, external command execution shorthand

Notice that I did not put "Bracey syntax" under Python, nor "Braceless
syntax" under Pike, despite them not having those options. Notice also
that I didn't put "simpler loop syntax" in either; Python's loops you
know about, and Pike gives you the C-style "for (int i=0; i<10; ++i)"
form and "foreach (collection, item)" like Python's "for item in
collection". The only thing I might yearn for - *MIGHT* - would be for
Python to gain an "index-and-value" iteration form like Pike's
"foreach (collection; index; value)", which for dictionaries would be
like iterating over .items(), and for lists would be like using
enumerate(). But I've never actually found myself yearning for it
while I'm writing Python code - it's a small convenience when I'm
working in Pike, is all.

Does Python "lack" the simple repeat statement? Well, in the sense
that it doesn't have it, sure. But Python also doesn't have a single
function to read a line from a gzipped file and strip HTML tags from
it before returning it [1]. Not everything that doesn't exist is
needed.

ChrisA

[1] http://php.net/manual/en/function.gzgetss.php



More information about the Python-list mailing list