Skip to content

Choosing Python over Gambas

clearkimura edited this page Oct 5, 2015 · 7 revisions

Early releases were using Bash scripts and Gambas 2, then ported to Gambas 3. However, the 4.x release has been rewritten in Python and PyQt.

Choosing Python and PyQt had the following advantages:

  1. No glue code: Python bindings for Qt (PyQt4) are used thus, calling sub-processes is avoided as much as possible with native exceptions handling that are used across backends and frontends.

  2. Portability: Qt has support for many platforms and architectures, wherelse the less used Gambas does not (or didn't support at the time).

  3. Python is duck-typed language which allows various things to be done with the same codebase and a handful of tricks.

  4. Errors catching was a pain, with Bash everything has to either be trapped or a code-block behind a statement had to be in place with a function what do when something bad happens. With Python, all of the errors are exposed and thrown at you right away when they happen but the cool part is that they are (sorta) categorized and the program can react according to the error and if possible try to its best to attempt to fix, cleanup, or something else for better results and user experience.

Clone this wiki locally