Is this a true statement: Part II
paulp at ActiveState.com
Fri Jun 29 21:33:48 CEST 2001
> 1. Excluding writing device drivers the answer is a clear yes.
Here's how I would summarize it. Programs have three main parts: getting
data (including user events) into the program, doing computation on it,
and getting data out of the program (including user feedback).
All proper programming language are equivalent on the "doing
computation" part. But the input and output parts depend on the
environment that the program is runing in.
You could write an operating system that could only be directly
programmed in Python. If you wanted to program in C++ or some other
language you would have to do it through a Python "glue" layer. But
that's a fantasy world. In the real world, most operating systems are
designed so that they can only be directly programmed in C or languages
at roughly the same abstraction level. Those of us who want to use
Python have to use the "glue". There is so much Python glue available
that it is easy to forget that it was all written. You couldn't do GUIs
in Python until someone wrote Tkinter or wxPython or Jython... You
couldn't remove files until someone wrote the "os" module.
There isn't a whole lot of interest in writing device drivers in Python
(for performance and security reasons) so nobody has written that glue.
> Why is C++ awful; what's wrong with it?
C++ is a large and complex language. In my opinion it tries but fails to
work both on the abstraction level of a high level language and a
low-level language which gives it a very confusing runtime model. One
minute you are doing things that look low-level but are really very
computationally expensive and the next you are being constrained from
doing something that seems reasonable because C++'s designers didn't
want to take the performance hit. Plus it is so complicated that the
implementations still vary widely so you have to "port" code from one
compiler to another.
Take a recipe. Leave a recipe.
Python Cookbook! http://www.ActiveState.com/pythoncookbook
More information about the Python-list