Why Python?

Why have I gone to all this work to support the BeOS C++ API from Python? I think I can write better software faster, if I can write it in Python. I don't think it will ever be easy to write computer programs, in the sense that just anyone can do well at it, but I can't afford to make it harder than it needs to be. Python is one way to get more mileage out of your programming effort. It's not the only language in that category, but it's probably the most popular one these days, for some practical reasons.

It's not the perfect language, and it's not the right language for every job, but there are a couple of specific strengths that stand out for me. I'm not going to describe Python in detail here, better go elsewhere for that (like the Python web site, for example.) The following are just two things that I think are really the key points.

There are lots of other nice things, too - useful builtin data types, a handy object oriented programming model with multiple inheritance, lots of standard library functions.

May as well mention the down side, too. Python is an interpreted language, so a Python program tends to be highly dependent on external extras like a Python interpreter, library modules etc., and it tends to be a little slower to start up. The Python language is gradually losing its early simplicity as it adds unnecessary features. Some small evidence from what I've seen of actual medium size Python software efforts suggest to me that its introspection and other programming conveniences do not necessarily foster good application design.

My current ideal is a functional programming language that combines the elegance and rigor of Haskell with the hard-headed engineering of the ocaml Objective Caml implementation - not that any such thing exists at this time, but it would be nice. These are both "functional" programming languages that also have many of the key advantages of Python, plus strong static typing via inference, where the compiler determines the type of an expression through analysis of the program rather than depending on declarations. This allows it to determine that the program is structurally correct - type safe - without imposing the burden of declarations on the programmer. Some people may find this totally unnecessary as they always produce correct programs on their own, but my own error rate is high enough that programs I write in Python invariably require long debugging cycles due to mistakes that could often have been discovered right away by the compiler.