Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learn Red ? Fundamentals of Red

You're reading from   Learn Red ? Fundamentals of Red Get up and running with the Red language for full-stack development

Arrow left icon
Product type Paperback
Published in May 2018
Publisher Packt
ISBN-13 9781789130706
Length 252 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Ivo Balbaert Ivo Balbaert
Author Profile Icon Ivo Balbaert
Ivo Balbaert
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Red's Mission FREE CHAPTER 2. Setting Up for Development 3. Using Words, Values, and Types 4. Code-Controlling Structures 5. Working with Series and Blocks 6. Using Functions and Objects 7. Working with Files 8. Parsing Data 9. Composing Visual Interfaces 10. Advanced Red 11. Assessments
12. Other Books You May Enjoy

Red's main features

As a programming language, Red embraces nearly all paradigms:

  • Imperative: Providing everything needed for controlling code execution and error-handling (see Chapter 4, Code Controlling Structures and Chapter 5, Working with Series and Blocks)
  • Functional: With functions as first class values (see Chapter 6, Using Functions and Objects)
  • Object-oriented: Complete with inheritance, but not class-based (see Chapter 6, Using Functions and Objects)
  • Concurrency: With async task support and an actor model (from v 0.9.0)
  • Symbolic: Being able to manipulate its own code as if it was plain data (all chapters)
  • Reactive: Included in the GUI (Graphical User Interface) system (see Chapter 9, Composing Visual Interfaces and Chapter 10, Advanced Red)

Aside from REBOL and LISP, Red has taken inspiration from the following:

  • Forth and Logo for its syntax
  • Lua, for its capabilities as an embedded language, and its JIT (Just-In-Time) compiler
  • Self, for its prototype object-model
  • Scala, for its type inference engine and compilation

Although it can be statically compiled, Red has a graphical REPL console (Read Evaluate Print Loop) like other dynamic and scripting languages, to experiment with code interactively. We will explore this console in Chapter 2, Setting Up for Development.

In contrast to REBOL, which is an interpreted language only, Red also compiles to native code through Red/System, thus achieving much better performance, something like Crystal compared to Ruby. Compared to C, at this moment Red/System is 2-4x slower.

Portability

Red runs in the Windows, Linux, Android, macOS, and FreeBSD environments in a 32-bit version (the 64-bit version is planned) with cross-compilation capability. Furthermore, it runs on ARMv5 processors and on the Raspberry Pi and Arduino boards.

Like a Swiss Army knife

The versatility of the Red platform makes it suitable for apps on the entire spectrum, such as:

  • High-level scripting (for example, glue code such as Lua)
  • Web apps
  • GUI desktop applications
  • Android apps (from Version 0.7 onward)
  • 2D games
  • Data processing
  • Grammar parsing and constructing specialized languages
  • Network/system programming, IoT devices programming, robotics
You have been reading a chapter from
Learn Red ? Fundamentals of Red
Published in: May 2018
Publisher: Packt
ISBN-13: 9781789130706
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image