Embedded Red and macros
In this short section, we will touch on some advanced topics in Red that you should know about. We'll give you references to more detailed descriptions in case you need them for your projects.
Embedded Red
Software written in languages other than Red can interact with Red through libRed, a special version of the Red interpreter and runtime library. That way, for example, a C program can interact with a Red environment. Bindings also exist for Visual Basic, Ruby, and Julia (https://github.com/joa-quim/Red.jl). Detailed docs are at https://doc.red-lang.org/en/libred.html and https://github.com/red/red/wiki/libRedfor additional examples.
Macros
Another feature many modern programming languages have is macros. Macros are about transforming code at runtime. By now, you should be convinced that Red is already well equipped to do that with minimal effort; think about all you can do with do
, reduce
, and load
. After all, code is data and data is code! Because Red is first of...