Can I name an enum cases starting starting with a number

Asked on 2025-06-13

1 search

In Swift, you cannot name enum cases starting with a number. Enum cases must start with a letter or an underscore and can contain letters, numbers, and underscores. This is a general rule in Swift's naming conventions to ensure clarity and consistency in code. If you have any more questions about Swift or other topics discussed at WWDC, feel free to ask!

Can I name an enum cases starting starting with a number | Ask WWDC