Q is an expression-oriented language. Everything in Q is an expression. In fact, a "program" is nothing other than a complete expression. Expressions in Q very much resemble arithmetic expressions. Just like arithmetic expressions, expressions in Q are conceptually trees of subexpressions. Hence, the elements of the Q language naturally fall into two categories, the basic expressions at the leaves and the composite expressions at the internal nodes. Basic expressions are the fundamental building blocks of all expressions. They are like numbers in arithmetic expressions. Composite expressions are the means by which larger expressions are constructed from smaller expressions. Hence, they are like arithmetic operators.
Another parallel between arithmetic expressions and expressions in Q is in evaluation. Just as in arithmetic expressions, the evaluation of an expression proceeds recursively, with each composite expression evaluating its subexpressions.
Q is a side-effect free language. Evaluation involves the combination of values rather than a change of state. In particular, there are no variables whose value changes as a program runs. Another important consequence of this is that no program can alter the model currently loaded into IBM® Rational® Rhapsody® ReporterPLUS.
Q is a typed language. Every well-formed expression in Q has a precise type. The Q language compiler infers this type and verifies that all expressions are compatible in type.