IBM Streams 4.3.0

SPL language elements

Some elements of the Streams Processing Language (SPL) are similar to the concepts and syntax of traditional programming languages, such as types and expressions. But the design of SPL is focused on processing streaming data.

SPL contains the following elements:
Types
The lowest-level element of the language. SPL supports many primitive data types, such as Boolean and integral, and composite data types, such as collections and tuples.
Expressions
Expressions in SPL are similar to expressions in typical imperative or functional languages.
Statements
Statements are the traditional building blocks of imperative languages. You can use them inside operator logic and function definitions.
Functions
The function declaration syntax in SPL is similar the function declaration syntax in the C++ programming language. The return type is first, followed by the function name and then the list of parameters inside parentheses.

Functions are called from expressions. You can write functions in SPL, C++, or Java™. Functions that are written in C++ or Java are called native functions. Both kinds of functions can be invoked from the same SPL syntax.

Clauses
The body of an operator invocation is separated into clauses, for example, config and param. Clauses provide the details about how the operator works for specific operator invocations.