You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The case conventions around method and argument names are inconsistent, which makes it difficult to remember whether I should use camelCase or snake_case for a given call.
The convention in Crystal is to use TitleCase (which some also call CamelCase, but that's confusing) for class/struct/module names and snake_case for everything else*. Would you be open to a PR for this? I can attempt to keep existing calls backwards-compatible with deprecation warnings using the Deprecated annotation.
*Constants and enum members are an exception to this, and they seem to be pretty split between TitleCase and SCREAMING_SNAKE_CASE, even in the stdlib. However, at least in the case of enums, we can use snake_case in most places anyway through automatic symbol->enum conversion (when passing an enum value as a method argument) and automatically generated enum predicate methods (like HTTP::Status#not_found?)
The text was updated successfully, but these errors were encountered:
The case conventions around method and argument names are inconsistent, which makes it difficult to remember whether I should use camelCase or snake_case for a given call.
The convention in Crystal is to use TitleCase (which some also call CamelCase, but that's confusing) for class/struct/module names and snake_case for everything else*. Would you be open to a PR for this? I can attempt to keep existing calls backwards-compatible with deprecation warnings using the
Deprecated
annotation.*Constants and
enum
members are an exception to this, and they seem to be pretty split between TitleCase and SCREAMING_SNAKE_CASE, even in the stdlib. However, at least in the case ofenum
s, we can use snake_case in most places anyway through automatic symbol->enum conversion (when passing anenum
value as a method argument) and automatically generatedenum
predicate methods (likeHTTP::Status#not_found?
)The text was updated successfully, but these errors were encountered: