The type/object distinction and possible synthesis of OOP and imperative programming languages

Ian Kelly ian.g.kelly at gmail.com
Tue Apr 16 19:14:45 EDT 2013


On Tue, Apr 16, 2013 at 4:38 PM, Mark Janssen <dreamingforward at gmail.com> wrote:
> I think his point remains valid, from a theoretical pov.  Python
> prides itself on the idea of "first-class functions" and such, but
> unlike the world of lambda calculus, this selling point is a bit
> invalid.  Because for Python (and any C-based language), it is roots
> squarely in the Turing machine and its real-word implementation.

I'm having a hard time following what you're trying to say here.
Lambda calculus and Turing machines are theoretical models of
computation, not languages.  You can model Lisp programs with Turing
machine, and you can model C programs with lambda expressions.
Practically speaking you would probably have an easier time doing it
the other way around, due to the procedural nature of the Turing
machine versus the functional nature of the lambda calculus.

By the usual definition of "first-class function" [1], Python
functions are first-class; this has nothing to do with functional vs.
procedural programming (although it is more commonly found in the
former) or to do with Turing machines (which don't even include
functions as a concept).

>   (Note this contrasts starkly with Java(script), which doesn't seem
> to be based on anything -- can anyone clarify where Java actually
> comes from?)

I don't understand why you would consider Python to be "C-based" or
"Turing machine-based" but not Java or Javascript.

[1] http://en.wikipedia.org/wiki/First-class_citizen



More information about the Python-list mailing list