Red (programming language)

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

Some technical details

Red has two parts, Red/System and Red:

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

 Red is a higher language and interpreted, used for general-purpose tasks. 

The language is able to cross-compile. 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".

 Examples 

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

 Further reading 


Other websites
 Red's website
 Red's newest downloads
 Red Programming Language on GitHub
 Redprogramming.com
 Helpin' Red 

Category:Programming languages
Category:Cross-platform software
Category:Functional languages
Category:Multi-paradigm programming languages