The type/object distinction and possible synthesis of OOP and imperative programming languages
Terry Jan Reedy
tjreedy at udel.edu
Mon Apr 15 00:56:02 EDT 2013
Note: cross-posting to mailing lists does not work well. Hence the reply
only to python-list and the gmane mirror.
On 4/14/2013 11:48 PM, Mark Janssen wrote:
> Python is an "interpreted" language.
I consider this a useless or even deceptive statement. Python is an
object-based algorithm language. The CPython implementation (currently)
*compiles* Python code to a virtual machine bytecode, similar to Java
bytecode. This could change. Jython translates to Java, which is then
compiled to Java bytecode. Do you call Java an 'interpreted' language?
There are compilers that compile Python to the same 'object code' that C
is compiled to.
>Since 2001, Python's has migrated towards a "pure" Object model.
It migrated towards a pure class model.
> model (ref: http://www.python.org/download/releases/2.2/descrintro/).
> Prior to then, it had both types and classes and these types were
> anchored to the underlying C code and the machine/hardware
> architecture itself.
I started with Python 1.3 and I have no idea what you mean by this. I
think you are heavily confusing Python the language and CPython the
implementation.
> After the 2001 "type/class unification" , it
> went towards Alan Kay's ideal of "everything is an object".
Everything has always been an object with value and identity.
This stands in contrast to the assemble/C model that everything (except
registers) is a block of linear memory with an address.
> My question is: Is there something in the Computer Science literature
> that has noticed this distinction/development in programming language
> design and history?
To me, there should be, since this is a fundamental distinction in data
models. I think the biggest problem in shifting from C to Python is
'getting' the data model difference. For Lispers, the difference is the
syntax.
--
Terry Jan Reedy
More information about the Python-list
mailing list