#Why does std use TitleCase for error values?

1 messages · Page 1 of 1 (latest)

quartz olive
#

Hi. I was wondering if anyone knows.

Why does std use TitleCase for error values?
(e.g. OutOfMemory, BrokenPipe).

The style guide says to use TitleCase for types only.
https://ziglang.org/documentation/master/#Names
Intuitively, it seems that snake_case would be appropriate for error values.

My interpretation why using TitleCase for error values is that an error value is also part of an error set type.
Is this correct?

clear elm
#

The style guide is just incomplete here - there's no specific reasoning, we've just landed on PascalCase as the preferred style for error names. It's not related to the rule for type names