Red (programming language)

Red
Red Logo (stylized Tower of Hanoi)
ParadigmMulti-paradigm: imperative, functional, symbolic
Designed byNenad Rakočević[1]
DeveloperNenad Rakočević
First appeared2011
Stable release
0.6.5[2] (Beta) / February 19, 2024
OSLinux, Windows, OS X
Licensemodified BSD and Boost
Filename extensions.red, .reds
Websitewww.red-lang.org Edit this at Wikidata
Influenced by
Rebol, Lisp, Scala, Lua

Red is a programming language designed to overcome the limitations of the programming language Rebol.[3] Red was introduced in 2011 by Nenad Rakočević,[4] and is both an imperative and functional programming language. Its syntax and general usage overlaps that of the interpreted Rebol language.[5]

The implementation choices of Red intend to create a full stack programming language:[4][6] Red can be used for extremely high-level programming (DSLs and GUIs) as well as low-level programming (operating systems and device drivers). Key to the approach is that the language has two parts: Red/System and Red.[7]

  • Red/System is similar to C, but packaged into a Rebol lexical structure – for example, one would write if x > y [print "Hello"] instead of if (x > y) {printf("Hello\n");}.
  • Red is a homoiconic language, which is capable of meta-programming with Rebol-like semantics.[3][8] Red's runtime library is written in Red/System, and uses a hybrid approach: it compiles what it can deduce statically and uses an embedded interpreter otherwise. The project roadmap includes a just-in-time compiler for cases in between, but this has not yet been implemented.

Red seeks to remain independent of any other toolchain; it does its own code generation.[3] It is therefore possible to cross-compile[6] 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 modified BSD 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".[9]

Red Language architecture schema
  1. ^ "Creator of Red". GitHub.
  2. ^ "Red's changelog". red-lang. Retrieved February 21, 2024.
  3. ^ a b c "Getting Started with GUI Programming using Red Language". Studytonight. Retrieved September 17, 2021.
  4. ^ a b Balbaert 2018.
  5. ^ "Interview with Nenad Rakocevic about Red, a Rebol inspired programming language". Not a Monad Tutorial. 28 August 2015. Retrieved August 28, 2015.
  6. ^ a b "6 Unusual & Groundbreaking Programming Languages to Learn in 2023". makeuseof.com. 18 October 2023.
  7. ^ Lucas, Mathis (21 July 2023). "Red: an imperative and functional programming language that is also a "full battery" language". Developpez.com. Retrieved 16 January 2023.
  8. ^ Sasu, Alexandru (22 November 2018). "Review of Red". Softpedia. Retrieved February 21, 2024.
  9. ^ lucindamichele. "0.6.4 Simple GC and Pure Red GUI Console". Retrieved 2018-12-16. 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

From Wikipedia, the free encyclopedia · View on Wikipedia

Developed by Tubidy