The lovely Python:python realizes inside

Source: Internet
Author: User
Tags versions in python

When most programmers talk about "Python", they may think of this particular implementation, sometimes called "CPython" (because it is implemented in C). But Python, as a language specification, has been implemented several times with the evolution of the reference implementation of Guido van Rossum. This article contains an interview with comments from the founders of two non-standard Python-stackless and Vyper. The Linux zone on the Developworks Web site is a developer resource for Linux, Linux resources, and Linux development.

As I understand it, you can now download and run the four Python implementations, and one of the implementations is being created. Each implementation has a special reason for its existence, which can be learned here from the implementation of the developer's own words.

The implementation of recompiling the compiler or interpreter for different platforms is only slightly different (there may be a small amount of conditional compilation and change), but the most interesting implementations (as far as I am concerned) are those that transcend platform issues. In fact, most of the Python implementations that we'll see in this article are more than just platforms in themselves. The concept of implementation is also different from the concept of version. As far as language features are concerned, all the implementations discussed here are essentially in the same language version (1.5.2). Obviously, CPython 1.6/2.0/3000 already has a part of the new basic implementation, but other implementations can be consistent with those language-level features.

Which programming languages are implemented again, how often, and for what reasons, and by whom? It is very difficult to describe this group of languages. Some popular languages that are almost in the same position as Python-such as Perl, REBOL, and PHP-have only one implementation (compiled into many platforms). TCL is most similar to perl/php, but it does have a version of the Java platform called Jacl. From the other extreme, languages such as C, Awk, Cobol, REXX, and Java, each has been implemented countless times. But those implementations are for licensing and marketing considerations, not for implementation concepts and abstract issues. Those languages that seem to have special academic implications are much more likely to be implemented (especially functional, logical, or hyper-pure OOP languages, such as Smalltalk and Eiffel). Lisp does not have hundreds of or dozens of implementations and derivations.

Unlike the Python implementations we will discuss, Lisp's derivation often introduces many novel language features while providing new implementations. Python implementations are largely the same Python language as the major CPython versions. All existing versions are the result of an open source collaborative effort, where innovation has little to do with market positioning and even with the license battles that sometimes lead to the splitting of open source projects. Also, different versions of Python are not really traditional tributaries, but rather focus on different concepts that prove itself to be a python implementation.

Two implementations that are not described in detail are Jpython and python.net. Jpython is a Java-written compiler that compiles Python source code into Java bytecode. The Python application is ultimately run in the JVM (users may not know it is written in Python source code instead of Java and they don't need to care). Python.net is an undelivered implementation, but it--at least structurally--will resemble Jpython. Python.net will involve Python in Microsoft's. NET project, which is essentially close to a non-Java VM that can run programs written in a variety of languages, such as New C #, visual, Basic, C + +, and Python. Keep an eye on the information that the developers of these implementations publish.

There are two theoretically fascinating implementations, so let's hear what their developers are saying: Develop Vyper's John Max skaller and develop stackless python Christian tismer.

Vyper: Interview founder John Max Skaller

Vyper is the implementation of the Python language written in functional language Ocaml (3.00). Compared to other Python implementations, Vyper offers some (optional) language extensions: More powerful scoping rules and some new functional features. Vyper is no longer developing now, but it may be enhanced later (see Resources for Vyper, and its source code.) )。 I asked Vyper's founder John Max Skaller about the motives for building the Vyper.

Skaller: There are two reasons to build Vyper: First, I like Python, especially its simplicity. But I don't like it. Lack of scope certainty, everything needs to make a lot of changes to make progress. So I decided to correct these problems by building a much higher programming language and building some of the concepts of functional programming languages while preserving Python compatibility.

The second reason is performance. I have a major Python program called Interscript, a read-write programming (LP) tool that is not only poorly structured in Python (as described above), but also plagued by performance problems.

Mertz: Since text programming is a motivation for creating vyper, I think it would be helpful if you could simply introduce what is written and read-write programming.

Skaller: The idea is that you don't need to record documents for your program (after programming), but rather write documents that contain programs. [It] was invented by Donald Knuth.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.