code review

Steven D'Aprano steve+comp.lang.python at pearwood.info
Fri Jul 6 09:58:10 EDT 2012


On Fri, 06 Jul 2012 04:22:18 -0700, lars van gemerden wrote:

> Avoiding suprises would mean we cannot improve languages, just reshuffle
> features?

No, of course not.

But there have been hundreds of programming languages, including many 
different programming paradigms (procedural, imperative, object oriented, 
stack-based, functional, logic, aspect, event-driven, natural language, 
and many others), and tens of millions of person-days worth of experience 
in programming. It's not 1960 any more, in general terms we mostly have a 
good idea of what works and what doesn't. (Sadly, when I say "we" I mean 
collectively. Many language designers, and programmers, don't have the 
foggiest clue as to what makes a good clean design. Hence C++ and PHP.)

The days when you could expect a brilliant new programming paradigm to 
lead to a massive improvement in programmer productivity, like going from 
assembly code to Fortran, are long gone. Now we look for incremental 
improvements. (Although of course there is always a chance that some yet 
unthought of new paradigm will revolutionise computer programming -- but 
I wouldn't bet on it.)

When you're dealing with a well-designed, mature language like Python, 
you are even more limited. There's only so many changes you can make 
without turning it into a completely different language. And if you care 
about backward compatibility and wish to avoid breaking existing 
programs, there are even fewer changes that can be considered.

Many good programming features must be avoided, not because they are bad, 
but because they don't match the rest of the language. Even though Python 
copies features from many different paradigms and languages, there is a 
mostly unified style of good Python code and any feature that doesn't 
match that style should be left out. There's few things worse than a 
language with random features just bolted on.


-- 
Steven



More information about the Python-list mailing list