Reserve dollar sign ($) to be forever unused

Summary

This RFC proposes a stable contract that $ will not be used for any features in Luau, and will not be accepted as part of identifier tokens.

Motivation

By reserving $ external pattern matching tools, which at time of writing are already planned to be created by both Roblox and full-moon, can use it to symbolize things like placeholder tokens, similar to ast-grep.

For example, a search in ast-grep for “checking equality to itself” would be $A == $A. This becomes ambiguous and harder to write if $A is also a valid identifier, or means some potential expression.

Design

Nothing more than a stable contract is necessary. $ will not be allowed in identifiers, and $ will not be a component of any syntax being added to the language.

$ is chosen as it seems fairly unlikely we will ever use it for any syntax, while at the same time its use as a placeholder token is common.

Drawbacks

The dollar sign is used in a couple of places outside Luau:

These use cases are nowhere near compelling enough to where we would likely do the same.

Alternatives