---
title: "Rule 3.5: Textual structure and names in TypeShade"
description: "Rule 3.5 of the TypeShade language design, in Textual structure and names."
url: https://typeshade.dev/reference/rules/3-5/
language: en
---

# Rule 3.5

Chapter 3, Textual structure and names Test

A name the compiler generates (the mangler, the type aliaser) must not be a keyword or reserved word of either target.

The rule text and the parts under it are the compiler's own English, as the design document writes them.

## Rationale

a generated `as` is a program the author never wrote and cannot fix.

## Derives from

the same two WGSL sections; `WGSL_RESERVED` and `GLSL_ES300_RESERVED` in `src/core/reserved-words.ts`, from which `RESERVED_WORDS`, the list a generated name is checked against, is built.

## How it is verified

Checked by a test. A test, a gate script or a CI workflow names this rule, and the traceability check fails when a file listed below stops naming it.

Where the rule says the compiler enforces it:

`examples/reserved-word-safety.test.ts`, asserted on the rename maps.

The files that verify it at commit af54ddad5, each at the first line that names the rule:

- [`examples/reserved-word-safety.test.ts:23`](https://github.com/typeshade/typeshade/blob/af54ddad5/examples/reserved-word-safety.test.ts#L23)
- [`src/core/backends/glsl-entry-wrapper-name.test.ts:17`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/backends/glsl-entry-wrapper-name.test.ts#L17)

## See also

- [Rule 3.4](https://typeshade.dev/reference/rules/3-4/) Test
- [Rule 3.6](https://typeshade.dev/reference/rules/3-6/) Test
- [Design rules](https://typeshade.dev/reference/rules/)
- [Error codes](https://typeshade.dev/reference/errors/)

## Source

The rule at commit af54ddad5:

- [`docs/language-design.md:288`](https://github.com/typeshade/typeshade/blob/af54ddad5/docs/language-design.md#L288) (the design document)
- [`reqs/rules/RULE-0305.md`](https://github.com/typeshade/typeshade/blob/af54ddad5/reqs/rules/RULE-0305.md) (its traceability item)
