Are the critiques in "All the things I hate about Python" valid?

bartc bc at freeuk.com
Sat Feb 17 20:31:13 EST 2018


On 18/02/2018 00:45, Chris Angelico wrote:
> On Sun, Feb 18, 2018 at 11:13 AM, bartc <bc at freeuk.com> wrote:

> It's text, but it is an intermediate or "object" file. It's not doing
> pointless stuff; it's coping with the myriad platforms and variants
> that Python has support for.

It could well do all that. But it surely cannot need 18,000 lines' worth 
to do it; that much should be obvious to anyone. And in fact, for 
building with MS's Visual Studio, it doesn't use that file at all, but 
something smaller. (Although the MS build adds its own complexities.)

Anyway a lot of that stuff also seems to be going on inside the C header 
files - have a look inside pyconfig.h. (I tried my own C compiler on it 
and it seems to think it's MSVC.)

This part of it is incredibly messy and could do with a rewrite.

> You're welcome to go through CPython to find unnecessary code if you
> like. Just read the SOURCE CODE, not the intermediate files. Stop
> exaggerating the situation.

I'm sorry, I must have misunderstood your post where you said that by 
reducing the size of a program and spreading it over fewer files, you 
found it easier to detect problems like redundant code.

CPython comprises 660 .h and .c files (looking only at C sources). Not 
the biggest project (I believe gcc has 45,000 such files), but still a 
fair number. And there are 4000 files in all.

-- 
bartc



More information about the Python-list mailing list