Chapter 1. The Orc Programming Language

Table of Contents

1.1. Introduction
1.2. Cor: A Functional Subset
1.2.1. Constants
1.2.2. Operators
1.2.3. Conditionals
1.2.4. Variables
1.2.5. Data Structures
1.2.6. Patterns
1.2.7. Functions
1.2.8. Comments
1.3. Orc: Orchestrating services
1.3.1. Communicating with external services
1.3.2. The concurrency combinators of Orc
1.3.3. Revisiting Cor expressions
1.3.4. Time
1.4. Advanced Features of Orc
1.4.1. Special call forms
1.4.2. Extensions to pattern matching
1.4.3. Datatypes
1.4.4. New forms of declarations

1.1. Introduction

This chapter describes the Orc programming language in three steps. In Section 1.2, we discuss a small subset of Orc called Cor. Cor is a pure functional language, which has no features for concurrency, has no state, and does not communicate with external services. Cor introduces us to the parts of Orc that are most familiar from existing programming languages, such as arithmetic operations, variables, conditionals, and functions.

In Section 1.3, we consider Orc itself, which in addition to Cor, comprises external services and combinators for concurrent orchestration of those services. We show how Orc interacts with these external services, how the combinators can be used to build up complex orchestrations from simple base expressions, and how the functional constructs of Cor take on new, subtler behaviors in the concurrent context of Orc.

In Section 1.4, we discuss some additional features of Orc that extend the basic syntax. These are useful for creating large-scale Orc programs, but they are not essential to the understanding of the language.