[Python-ideas] Documenting Python warts

Oleg Broytman phd at phdru.name
Wed Jan 2 04:08:51 CET 2013


On Tue, Jan 01, 2013 at 04:54:34PM -0800, alex23 <wuwei23 at gmail.com> wrote:
> The pain people are experiencing with "warts"
> like mutable defaults is entirely from trying to force Python to fit
> mental models they've constructed of other languages.

 Yes. And preserving this mental model is important. There is a common
mental model for similar imperative languages, common set of built-in
types (chars, strings, integers, floats) and containers (arrays and
matrices), common set of operations (addition is always spelled as infix
'plus' sign, logical AND -- as '&' or '&&'); there are functions with
parameters -- usually written inside round parentheses; in
object-oriented languages there are classes with inheritance...
 So it's perfectly natural when people using one language expect
features found in other languages, and expect those features to work in
similar ways.
 Sure, every particular language deviate from that common model. Often
people can tolerate the deviation, sometimes they even praise it for
some reasons. But when a deviation makes pain for too many developers --
there is certainly a problem.
Oleg.
-- 
 Oleg Broytman http://phdru.name/ phd at phdru.name
 Programmers don't die, they just GOSUB without RETURN.


More information about the Python-ideas mailing list

AltStyle によって変換されたページ (->オリジナル) /