Throughout this book, we have seen that Red, thanks to its metaprogramming capabilities, is especially well suited for creating domain-specific languages (DSLs). Red already uses a number of dialects, such as parse, vid, draw, and Red/System. The Red team is building a DSL for smart contract and dapp programming, called Red Cross Chain Code (Red/C3). This dialect will compile directly to the bytecode of the different virtual machines (VM) of the blockchains it will target; it will first run on the Ethereum framework. The dapps' user interfaces will be built with Red's cross-platform GUI capabilities we discussed in the previous chapter.
Red/C3, written in Red, will consist of two layers:
- A very high-level layer of specialized, almost ...