Next: , Up: Design Advice   [Contents][Index]


3.1 Which Languages to Use

When you want to use a language that gets compiled and runs at high speed, the best language to use is C. C++ is ok too, but please don’t make heavy use of templates. So is Java, if you compile it.

When highest efficiency is not required, other languages commonly used in the free software community, such as Lisp, Scheme, Python, Ruby, and Java, are OK too. Scheme, as implemented by GNU Guile, plays a particular role in the GNU System: it is the preferred language to extend programs written in C/C++, and also a fine language for a wide range of applications. The more GNU components use Guile and Scheme, the more users are able to extend and combine them (see The Emacs Thesis in GNU Guile Reference Manual).

Many programs are designed to be extensible: they include an interpreter for a language that is higher level than C. Often much of the program is written in that language, too. The Emacs editor pioneered this technique.

The standard extensibility interpreter for GNU software is Guile (https://www.gnu.org/software/guile/), which implements the language Scheme (an especially clean and simple dialect of Lisp). Guile also includes bindings for GTK+/GNOME, making it practical to write modern GUI functionality within Guile. We don’t reject programs written in other “scripting languages” such as Perl and Python, but using Guile is the path that will lead to overall consistency of the GNU system.