digitalmars.D.learn - Enum name convention consistency
From std.range: enum StoppingPolicy { /// Stop when the shortest range is exhausted shortest, /// Stop when the longest range is exhausted longest, /// Require that all ranges are equal requireSameLength, } From std.thread:( phobos webpage) enum State; A fiber may occupy one of three states: HOLD, EXEC, and TERM. The HOLD state applies to any fiber that is suspended and ready to be called. The EXEC state will be set for any fiber that is currently executing. And the TERM state is set when a fiber terminates. Once a fiber terminates, it must be reset before it may be called again. HOLD EXEC TERM From std.stream: enum FileMode { In = 1, Out = 2, OutNew = 6, // includes FileMode.Out Append = 10 // includes FileMode.Out } Would not this be better if we keep the name convention consistent. Regards, Sam
Aug 18 2009
Sam Hu wrote:From std.range: enum StoppingPolicy { /// Stop when the shortest range is exhausted shortest, /// Stop when the longest range is exhausted longest, /// Require that all ranges are equal requireSameLength, } From std.thread:( phobos webpage) enum State; A fiber may occupy one of three states: HOLD, EXEC, and TERM. The HOLD state applies to any fiber that is suspended and ready to be called. The EXEC state will be set for any fiber that is currently executing. And the TERM state is set when a fiber terminates. Once a fiber terminates, it must be reset before it may be called again. HOLD EXEC TERM From std.stream: enum FileMode { In = 1, Out = 2, OutNew = 6, // includes FileMode.Out Append = 10 // includes FileMode.Out } Would not this be better if we keep the name convention consistent. Regards, SamNote that std.socket also uses the SHOUTY style. But I think Phobos should stick to the std.stream style. The std.range style seems to be one of Andrei's peccadilloes.
Aug 19 2009