| Red | |
|---|---|
Red Logo: a stylized rectangular Tower of Hanoi | |
| Paradigm | Multi-paradigm: imperative, functional, symbolic |
| Family | Rebol |
| Designed by | Nenad Rakočević |
| Developer | Nenad Rakočević |
| First appeared | February 2011 |
| Stable release | 0.6.6 (Beta)
/ March 19, 2025 |
| Implementation language | Rebol, Red |
| Platform | ARM, x86 |
| OS | Unix-like: Android, Linux, macOS; Windows |
| License | BSD 3-clause, Boost |
| Filename extensions | .red, .reds |
| Website | www |
| Influenced by | |
| Rebol, Lisp, Scala, Lua | |
Red is a programming language designed to overcome the limits of the programming language Rebol. Red was introduced in 2011 by Nenad Rakočević, and is both an imperative and functional programming language. Its syntax and general usage overlaps that of the interpreted Rebol language.
The implementation choices of Red intend to create a full stack programming language: Red can be used for extremely high-level programming (domain-specific languages (DSLs) and graphical user interfaces (GUIs) and low-level programming (operating systems and device drivers). Key to the approach is that the language has two parts: Red/System and Red.
if x > y [print "Hello"] instead of if (x > y) {printf("Hello\n");}.Red seeks to remain independent of any other toolchain; it does its own code generation. It is therefore possible to cross-compile Red programs from any platform it supports to any other, via a command-line switch. Both Red and Red/System are distributed as open-source software under the BSD 3-clause (modified) license. The runtime library is distributed under the more permissive Boost Software License.
As of version 0.6.4 Red includes a garbage collector "the Simple GC".
Red was introduced in the Netherlands in February 2011 at the Rebol & Boron conference by its author Nenad Rakočević. In September 2011, the Red programming language was presented to a larger audience during the Software Freedom Day 2011. Rakočević is a long-time Rebol developer known as the creator of the Cheyenne HTTP server.
Red's syntax and semantics are very close to those of Rebol. Like Rebol, it strongly supports metaprogramming and domain-specific languages (DSLs) and is therefore an efficient tool for dialecting (creating embedded DSLs). Red includes a dialect named Red/System, a C-level language which provides systems programming facilities. Red is easy to integrate with other tools and languages as a dynamic-link library (DLL) (libRed) and very lightweight (around 1 MB). It is also able to cross-compile to various platforms (see #Cross compiling section below) and create packages for platforms that require them (e.g., .APK on Android). Red also includes a fully reactive cross-platform GUI system based on an underlying reactive dataflow engine, a 2D drawing dialect comparable to SVG, compile-time and runtime macro support, and more than 40 standard datatypes.
The following is the list of Red's Goals as presented on the Software Freedom Day 2011:
The following commercial applications are currently developed on Red:
Red's development is planned to be in two phases:
As of 2018[update], supported cross-compiling targets include:
(As of 2018[update], Red applications are 32-bit. Plans are to move to 64-bit in future.)
The main feature for 0.6.4 is what we call the Simple GC (Garbage Collector). A more advanced GC is planned for the future