Sunday, September 7, 2014

Python to Go


Golang is a fully typed language with simple and clean syntax. The Go compiler will throw an error if you made a typo or called a method on the wrong object. This means you need to worry less about runtime errors, and writting unit tests. Go programs are compiled to native executables, or can be compiled to JavaScript using GopherJS.

PythonJS has a new backend in development that translates to Go. See the documentation here. The Go backend supports translation of Python classes and list comprehensions to Go. The PythonJS syntax has also been extended to support Go features like: go-routines and channels.

Go/Python Meetup

The Barcelona Python users group is hosting a free meetup on Oct 13th, see the details here. I will be going and giving a talk about using PythonJS to translate to Go, and using GopherJS to translate it back to JavaScript.