In Sway, structs, traits, and enums are CapitalCase. Modules, variables, and functions are snake_case, constants are SCREAMING_SNAKE_CASE. The compiler will warn you if your capitalization is ever unidiomatic.
CapitalCase
snake_case
SCREAMING_SNAKE_CASE
Was this page helpful?