Red (programming language)

From Simple English Wikipedia, the free encyclopedia
Red
Red's design (click to enlarge)
Paradigmimperative, functional, symbolic
Designed byNenad Rakočević[1]
DeveloperNenad Rakočević
First appeared2011
Stable release0.6.5[2] (Beta) / February 19, 2024
OSLinux, Windows, OS X, Syllable
Licensemodified BSD and Boost
Filename extensions.red, .reds
Websitewww.red-lang.org
Influenced by
Rebol, Lisp, Scala, Lua

Red is a programming language made to improve upon the older Rebol programming language.[3] It can be used for both high and low level programming.[4] Red was created by Nenad Rakočević in 2011.[1]

Some technical details[change | change source]

Red has two parts, Red/System and Red:[5]

  • Red/System is a lower language that has a similar purpose to C, but uses a different syntax.

The language is able to cross-compile.[5] Red applications can run on many different operating systems. At this time, Red applications are 32-bit, but it is planned to switch to 64-bit in the future. Red uses a garbage collector "the Simple GC".[6]

Examples[change | change source]

Here is a hello world program in Red.

Hello World!

Red [Title: "Simple hello world script"]
print "Hello World!"

Here is an example of using a variable:

  • To bind a word to a value, use a colon.
Red []

name: "John"
print name

Here are examples of conditionals in Red.

>> if 10 > 5 [print "large"]
large

>> unless 10 > 5 [print "large"]
== none

>> unless 5 > 10 [print "large"]
large

>> either 10 > 5 [print "bigger"] [print "smaller"]
bigger

>> either 5 > 10 [print "bigger"] [print "smaller"]
smaller

References[change | change source]

  1. 1.0 1.1 "Creator of Red".
  2. "Red's changelog". red-lang. Retrieved February 21, 2024.
  3. "Getting Started with GUI Programming using Red Language". Studytonight. Retrieved September 17, 2021.
  4. "6 Unusual & Groundbreaking Programming Languages to Learn in 2023". makeuseof.com. 18 October 2023.
  5. 5.0 5.1 Balbaert 2018.
  6. lucindamichele. "0.6.4 Simple GC and Pure Red GUI Console". Retrieved 2018-12-16.

Further reading[change | change source]

Other websites[change | change source]