Fuzion Logo
flang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.


Use of case and underscore

Identifiers used as feature names often consist of several words expressing what the feature does, e.g., a feature to parse an integer would use some combination of parse and integer in its name. The question is how to create such a composed name.

smallcase UPPERCASE camelCase PascalCase snake_case Snake_Pascal_Case SCREAMING_SNAKE_CASE kebab-case
example: parseinteger PARSEINTEGER parseInteger ParseInteger parse_integer Parse_Integer PARSE_INTEGER parse-integer
example: asstring ASSTRING asString AsString as_string As_String AS_STRING as-string
example: dataoutputstream DATAOUTPUTSTREAM dataOutputStream DataOutputStream data_output_stream Data_Output_Stream DATA_OUTPUT_STREAM data-output-stream
example: searchablelist SEARCHABLELIST searchableList SearchableList searchable_list Searchable_List SEARCHABLE_LIST searchable-list
Short ✅ Yes ✅ Yes ✅ Yes ✅ Yes ❌ No ❌ No ❌ No ❌ No
Words separated ❌ No ❌ No ✅ Yes ✅ Yes ✅✅ clearly ✅✅ clearly ✅✅ clearly ✅✅ clearly
Quiet ✅ Yes ❌ No ✅ Yes ✅ Yes ✅ Yes ✅ Yes ❌ No ✅ Yes
Used in - - Java, Pascal Java, Pascal C++, C, Eiffel, Python Ada Java -
Suggestion for Fuzion ✅ type arguments ✅ features and value types ref types and their constructor features