Clarity theorytheory 0/50 · 0%
Foundations · easy

1. Introduction to Clarity

A decidable language for Stacks.

Clarity is the smart contract language for the Stacks blockchain. It is interpreted (not compiled to EVM-style bytecode) and non-Turing complete, which means it forbids loops and recursion to ensure that all execution paths are finite and predictable.

clarity
(define-public (hello-world)
  (ok "Hello, Stacks!"))

This predictability is known as 'decidability', allowing developers to know exactly how much gas a transaction will consume and what its outcome will be before broadcasting it to the network.

Check your understanding

  1. 1. What does 'decidability' mean in Clarity?

  2. 2. Is Clarity a compiled language?

  3. 3. Which of these is forbidden in Clarity?