[ACCEPTED]-Programming languages with python-like syntax but native code generation-syntax

Accepted answer
Score: 14

Cython might do -- the C code it generates is 3 for Python extensions, but the whole thing 2 can be packaged up and you'll be running 1 native code throughout (after the 'import';-).

Score: 9

I must admit that I don't quite understand 25 your question, for two reasons:

  1. You are asking 24 for a language with native code generation, but 23 native code generation has nothing to do 22 with the language, it is a trait of the 21 implementation. Every language can have an implementation 20 with native code generation. Several Python 19 implementations have native code generation. There 18 are C compilers that compile to JVM bytecode, CIL 17 bytecode or even ECMAScript sourcecode. There 16 are even C interpreters. There are also compilers that 15 compile Java sourcecode or JVM bytecode 14 to native code.

  2. Why do you care about the 13 syntax? It is probably the least important 12 factor about choosing a programming language.

Anyway, Nim is 11 a programming language which has an implementation 10 which supports native code generation (or 9 more precisely an implementation which supports 8 C source code generation) and whose syntax 7 is a hybrid between Wirthian style (by the 6 looks of it the most important influences 5 are Oberon and Delphi) and Python.

However, the 4 fact that it has Pythonic syntax isn't going 3 to help you at all if you don't like European 2 style language design or Wirthian style 1 OOP.

Score: 7

Also found today Delight applying Python syntax 1 on a D back-end.

And Converge too.

Score: 7

Check out Cobra

It is strongly influenced by Python, C#, Eiffel, Objective-C 5 and other programming languages. It supports 4 both static and dynamic typing. It has first 3 class support for unit tests and contracts. Cobra 2 provides both rapid development and performance 1 in the same language.

Score: 6

shedskin compiles Python to C++

From shedskin project 6 page

Shed Skin is an experimental compiler, that 5 can translate pure, but implicitly statically 4 typed Python programs into optimized C++. It 3 can generate stand-alone programs or extension 2 modules that can be imported and used 1 in larger Python programs.

Score: 4

Genie which is part of the gnome project: http://live.gnome.org/Genie

I 1 think it's exactly what you're looking for.

Score: 3

If you are happy with something that compiles 14 down to Java bytecode you could have a look 13 at Jython. Quoting from their FAQ:

JPython is an 12 implementation of the Python programming 11 language which is designed to run on the 10 Java(tm) Platform. It consists of a compiler 9 to compile Python source code down to Java 8 bytecodes which can run directly on a JVM, a 7 set of support libraries which are used 6 by the compiled Java bytecodes, and extra 5 support to make it trivial to use Java packages 4 from within JPython.

I've not actually used 3 it yet but am considering it on some projects 2 where I have to integrate with existing 1 an Java codebase.


Score: 3

PyPy is a project to re-implement Python in 6 Python. One of it's goals is to allow the 5 use of multiple back-ends, including C. So 4 you can take a pure Python program, convert 3 it to C and compile it to native code. It 2 is still a work in progress, so probably 1 not suitable for production code.

Score: 2

You can find all of the previously mentioned 1 languages, plus some more, here: http://wiki.python.org/moin/PythonImplementations

Score: 1

You can also investigate IronPython - a python inplementation 1 on the .NET framework

Score: 1

Nim is a statically typed compiled systems 3 programming language. It combines successful 2 concepts from mature languages like Python, Ada 1 and Modula.


Score: 0

You can try Genie. It's the same like Vala, but with 4 Python-like syntax. If you want to develop 3 apps for Linux with GTK, and you want to 2 compile it to native app, Vala or Genie 1 is really good choice.

More Related questions