---
audience: engineers
summary: Block structure, expression vs statement, operator precedence, and the common
  shape every ScaiCore construct shares.
title: Syntax fundamentals
path: reference/language/syntax-fundamentals
status: published
---

### 2.1 RULE: `:` for Types, `=` for Everything Else

This is the single most important syntax rule. No exceptions.

```scaicore
// `:` ONLY appears in type positions:

type Invoice = {
    vendor: string,              // field type annotation
    amount: money,               // field type annotation
    items: array[LineItem]       // parameterized type
}

@flow process(invoice: Invoice): Result {   // parameter and return types
    ...
}

variable: ExplicitType = expression         // explicit variable type (optional)
```

```scaicore
// `=` for ALL value assignments and field settings:

@core InvoiceProcessor {
    version = "1.0"                          // core metadata
    description = "Processes invoices"       // core metadata
}

@flexible {
    goal = "analyze intent"                  // block field
    input = message                          // block field
    output = { intent: string }              // block field (note: `:` inside is a type)
}

@rigid {
    total = invoice.items.sum(i => i.amount) // variable assignment
    status = "processed"                     // variable assignment
}

@config {
    @param threshold: float = 0.7            // default value
}
```

### 2.2 RULE: Block Output via Assignment

All blocks produce output through assignment. No `->` arrows.

```scaicore
// ✅ CORRECT — assignment capture
result = @flexible {
    goal = "analyze document"
    input = document
    output = { summary: string }
}

// ❌ WRONG — arrow capture (removed from language)
@flexible { ... } -> result
```

### 2.3 RULE: No `any` Type

Everything must be explicitly typed. No escape hatches.

```scaicore
// ✅ CORRECT
output = { data: map[string, string] }

// ❌ WRONG
output = { data: any }
```

---