Is this a true statement: Part II

Paul Prescod paulp at
Sun Jul 1 16:11:56 EDT 2001

Kragen Sitaker wrote:
> >You could write an operating system that could only be directly
> >programmed in Python.
> I'm not sure how.  Nobody has yet come up with an operating system that
> could only be directly programmed in C, or Lisp, or Algol, or Java,
> despite implementing operating systems in all four.  I think some of
> the Burroughs machines required special god privileges to run the
> assembler, but there was still an assembler.

The word "directly" is pretty vague but the point is that you choose one
language's runtime model as the model supported by the APIs. Then every
other language has to translate into their model. So on some operating
systems, strings are null-terminated and have no length pointer.
Programming against those operating systems "directly" from Python is
impossible. Someone needs to put in PyString_FromString and
PyString_AsString calls. Similarly, if you made an operating system that
exposed all objects as PyObjects then C++ programmers would have to
translate them into native C types to do meaningful computation.
Take a recipe. Leave a recipe.  
Python Cookbook!

More information about the Python-list mailing list