Request for opinions: A cross language development tool
steve at pearwood.info
Tue Jun 21 12:25:03 EDT 2016
On Tue, 21 Jun 2016 10:10 pm, Tal Zion wrote:
> I would like to know your opinions about a project a friend and I have
> been developing for about a year now, which we really think could
> empower Python. Today Python is mostly used on servers.
> Many people who
> want to develop an app will choose Python to write the backend and
> great, and we don't see why we shouldn't be able to write a native iOS,
> Android or web app entirely in Python.
I'm not sure about iOS, but you can write desktop applications in Python,
and Android apps in Python, and web apps, although it's probably true that
> After all, these languages share
> the same concepts, more or less (classes, functions, exceptions, etc)
> and what really separates them is syntax. We're proposing a new
> approach: developers will code in their favorite language, such as
> code from Python, and use that code as if it were written in Python.
In a sense, this is bringing Python back to its roots as a glue language,
for bringing C or Fortran libraries together.
Be aware that there is a LOT of prior art here:
Kivy (multi-platform Python framework)
Julia's PyCall (allow Julia code to call Python code, and vice versa)
Integrating Python with the .Net and Mono framework:
- Python for .Net;
Integrating Python with Java:
Integration with C++:
- Weave (part of SciPy)
etc. So I think you may need to explain better exactly what your project
does that the others don't do.
> Python code will run on just about any platform, including the web.
> So how does this magic work? We developed a new compiler platform called
> Bridge. At the heart of Bridge is the Bridge Extensible Code
> Representation (BECR). Code in any language is parsed into an AST and is
> then translated to the BECR. The BECR supports common programming
> concepts (if, for, while, etc) and it can also be extended to support
> new concepts in order to ease the translation from the source language.
> Therefore, the translation from the source language’s AST to the BECR is
> easy as it**merely translates syntax. Then, Bridge translates the BECR
> to LLVM IR and from there the code can be compiled to x86, arm, asm.js
> or any other LLVM backend*. *After code has been translated to BECR, it
> doesn’t matter what the source language was, and the syntax barriers
> that stopped languages from working together disappear. This means that
> once more languages will be translated to the BECR, they will be able to
> work seamlessly together.
Sounds very optimistic. It's not just *syntax* barriers that stop languages
from working together. Consider:
x += y;
which is legal syntax in both C and Python (and probably a lot of other
languages). But the *semantics* are not necessarily the same. They're
likely to be different -- sometimes very different.
> Today, we have a basic demo showing an Android app written in Python
> displaying native Android buttons and labels inside a native scroll
> view. In this demo, Python code can import Java classes and inherit from
That's nice. How do we see that demo?
> Soon Bridge will be released as an open source project. We’d love to
> hear your opinions about this project. We’re really excited and we can’t
> wait to see Python being used in more and more places!
> Thanks, Tal**
More information about the Python-list