[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Request for opinions: A cross language development tool

On 06/21/2016 03:39 PM, Christian Gollwitzer wrote:
> Am 21.06.16 um 14:10 schrieb Tal Zion:
>> develop frontends in Java, Swift, Javascript, etc.
> >
>> 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. [.....]
>> 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*.
> So you have repeated .NET, or Parrot, or the JVM. What is new in your 
> system that sets it apart from these?
>> 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!
> Make sure you can do better than those:
> http://ironpython.net/ (Python on .NET)
> http://parrot.org/ (Python on the Perl-VM)
> http://www.jython.org/ (Python on the JVM)
> All of those projects promise a seamless integration of several 
> languages in a single VM. ALl of them have failed in the sense that 
> the languages have not converged onto that platform.
>     Christian

Hi Christian,
Thank you for your opinion, it is much appreciated.
There are similarities but there are also a few important implementation 

* It is easier to add languages to Bridge than it is to any of the above 
platforms: In order to make Python run on those platforms, those 
projects needed to write a compiler from Python to those platforms' 
respective intermediate languages. That is a very hard task. In Bridge, 
we provide the BECR, which makes it easy to re-use concepts implemented 
in other languages. For example, after we are done adding enough 
concepts to the BECR to compile 100% of Python's features, adding Ruby 
will be relatively easy as there are many similar concepts between the 
two languages.

* Bridge enables Python code to interact with more languages through our 
external interfaces: Bridge code can interact with libraries not 
compiled to Bridge. So Python code will be able to call Swift, 
Objective-C, Java, and C code, to name a few, even if they weren't 
compiled to Bridge.

* Bridge integrates with CPython in order to provide the same experience 
developers are used to: There are many Python modules written in C which 
are not usable in the above platforms. In Bridge you can use any CPython 
module. So when you are creating a Python list in Bridge, you are 
actually using CPython's list implementation.

* Bridge makes Python faster: Python code compiled through Bridge is 
compiled to native code. Because we are leveraging LLVM's many 
optimizations, Python code will run faster than ever.

* Bridge is more hackable: Using plugins, Bridge is much more accessible 
to community participation.

Most importantly, Bridge will enable Python code to run on many new 
platforms (iOS, Android, web browsers..), while none of the above 
platforms provide this ability. We aren't looking to compete with 
CPython, but rather to complement it.