8.2. Silence

8.2.1. Definition

An expression is silent in an execution if it never publishes in that execution. An expression is always silent if it does not publish in any execution. A silent expression may call sites. The type of a silent expression is Bot.

8.2.2. Examples

Silence with Side Effects
{- Silent expressions never publish but may have side effects 
   such as output to the console.
-}
 
  Println("print but don't publish") >> stop
| stop >> Println("never runs")

{-
OUTPUT:
print but don't publish
-}
Conditional Silence
{- 
  Ift(x) is silent if x is bound to false
  Ift(y) is silent because y is always bound to false
  Ift(z) is silent because z is never bound
-}

val x = true | false
val y = false
val z = stop

Ift(x) | Ift(y) | Ift(z)

{-
OUTPUT:
signal
-}
{-
OUTPUT:
-}

8.2.3. Related Links

Related Reference Topics