Skip to content

snake_case refactor: entire codebase#8

Open
arc-butler wants to merge 1 commit into
ARC345:mainfrom
arc-butler:snake-case-refactor
Open

snake_case refactor: entire codebase#8
arc-butler wants to merge 1 commit into
ARC345:mainfrom
arc-butler:snake-case-refactor

Conversation

@arc-butler

Copy link
Copy Markdown

snake_case Refactor

Converted the entire codebase from Hungarian/PascalCase to snake_case.

What changed

  • Types: CApplicationapplication, SMathmath, FVec2vec2, TUInt32u32, etc.
  • Methods: GetWidth()get_width(), OnUpdate()on_update(), SerializeToText()serialize_to_text()
  • Members: mWindowwindow_, mDatadata_ (trailing underscore convention)
  • Parameters: pFilepathfilepath, _DeltaTimedelta_time (stripped p/underscore prefixes)
  • Locals: viewportSizeviewport_size, MousePosmouse_pos
  • Enums/values: EKey::LeftControlkey::left_control, Playplay
  • Namespace: ARCarc
  • Type aliases: TStringstring, TRefref, FVec2vec2

Conventions

  • snake_case for all identifiers
  • Trailing _ for member variables
  • UPPER_CASE for macros only
  • No Hungarian prefixes (C, S, T, F, I, U, E, m, p)
  • ARC API surface is now arc::type_name instead of ARC::CTypeName

How it was done

  1. clang-tidy readability-identifier-naming for bulk rename (functions, locals, enums, template params)
  2. Python post-processing for Hungarian prefix stripping, member variable convention, and edge cases

Status

  • 132 files changed, 3862 insertions/3810 deletions
  • Will not compile on first try — some edge cases need manual fixing (e.g., template specializations, macro-generated names, include paths)
  • Expect ~50-100 compilation errors that need fixing

Convert all identifiers from Hungarian/PascalCase to snake_case:
- Types: CApplication -> application, SMath -> math, FVec2 -> vec2, etc.
- Methods: GetWidth -> get_width, OnUpdate -> on_update, SerializeToText -> serialize_to_text, etc.
- Members: mWindow -> window_, mData -> data_, mLayerStack -> layer_stack_, etc.
- Parameters: pFilepath -> filepath, _DeltaTime -> delta_time, pE -> e, etc.
- Locals: viewportSize -> viewport_size, MousePos -> mouse_pos, etc.
- Enums/values: EKey::LeftControl -> key::left_control, Play -> play, etc.
- Namespace: ARC -> arc
- Template params: TType -> type, etc.

Conventions:
- snake_case for all identifiers
- Trailing underscore for member variables (window_)
- UPPER_CASE for macros only
- No Hungarian prefixes (C, S, T, F, I, U, E, m, p) stripped

Performed with clang-tidy readability-identifier-naming + Python post-processing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant