update std.lang enums to conform to snake case convention #35735

Open
opened 2026-06-11 19:21:19 +02:00 by emilia · 10 comments
Migrated from https://github.com/ziglang/zig/issues/2101
emilia changed title from Release mode enumeration isn't snake-cased (?) to Long URLs or links cause bad width on phone view 2026-06-11 19:33:24 +02:00
emilia changed title from Long URLs or links cause bad width on phone view to Optimize mode enumerators aren't snake-cased (?) 2026-06-11 19:41:49 +02:00

They might refer to the cli options, in which case it could make sense to not use snake-case:

These are general rules of thumb; if it makes sense to do something different, do what makes sense. For example, if there is an established convention such as ENOENT, follow the established convention.

https://ziglang.org/documentation/0.16.0/#toc-Names

A good question could be whether or not it makes sense for the cli args to be TitleCase in the first place.
Maybe they should match the enum and thus be snake_case.

They might refer to the cli options, in which case it could make sense to not use snake-case: > These are general rules of thumb; if it makes sense to do something different, do what makes sense. For example, if there is an established convention such as ENOENT, follow the established convention. https://ziglang.org/documentation/0.16.0/#toc-Names A good question could be whether or not it makes sense for the cli args to be TitleCase in the first place. Maybe they should match the enum and thus be snake_case.
Author

I mean there's also https://ziglang.org/documentation/0.16.0/std/#std.Build.ReleaseMode, which is similar excluding the debug mode.

Isn't it PascalCase? Title Case as I'm aware is, for typesetting and reserved for titles, with spaces.

I mean there's also <https://ziglang.org/documentation/0.16.0/std/#std.Build.ReleaseMode>, which is similar excluding the debug mode. Isn't it PascalCase? Title Case as I'm aware is, for typesetting and reserved for titles, with spaces.
Member

that used to be the preferred casing for enums, it's just a very breaking change to rename these specifically so it hasn't been done yet.

that used to be the preferred casing for enums, it's just a very breaking change to rename these specifically so it hasn't been done yet.
Author

I thought about that too, but aren't breaking changes kinda expected/encouraged per release? As well, it's a bit of an inconsistency, I guess.

I thought about that too, but aren't breaking changes kinda expected/encouraged per release? As well, it's a bit of an inconsistency, I guess.
Member

even mechanical renames cause upgrade friction across the ecosystem. I'm sure it'll get done before 1.0 :)

even mechanical renames cause upgrade friction across the ecosystem. I'm sure it'll get done before 1.0 :)
linus 2026-06-11 20:43:58 +02:00
  • closed this issue
  • added the
    question
    label
Author

Thanks, just so you don't think I'm spamming, I had another issue/bug with long URLs breaking view width (on generated web docs), do you mind if I file it?

Thanks, just so you don't think I'm spamming, I had another issue/bug with long URLs breaking view width (on generated web docs), do you mind if I file it?
Member

of course, just closed this because it's not immediately actionable.

of course, just closed this because it's not immediately actionable.
andrewrk changed title from Optimize mode enumerators aren't snake-cased (?) to update std.lang enums to conform to snake case convention 2026-06-11 21:23:24 +02:00
andrewrk added this to the Pre-1.0 milestone 2026-06-11 21:23:46 +02:00
Owner

This needs to be done very carefully because it's breaking to a problematic degree.

  1. decl literals to introduce the alternate spelling
  2. allow both on the CLI also
  3. several release cycles where both are accepted
This needs to be done very carefully because it's breaking to a problematic degree. 1. decl literals to introduce the alternate spelling 2. allow both on the CLI also 3. *several* release cycles where both are accepted
andrewrk reopened this issue 2026-06-11 21:24:54 +02:00
Owner
Migrated https://github.com/ziglang/zig/issues/2101 to here
Author

M'lord Andrew 🫪

M'lord Andrew 🫪
Sign in to join this conversation.
No milestone
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ziglang/zig#35735
No description provided.