KhronosGroup / KhronosGroup/Vulkan-Samples

[Suggestion] Naming schema for different binding types

Open
#1,093 2 comments 1 reaction 0 assignees View on GitHub
framework
Dominant language
C++
Stars
5.4k
Forks
835
Avg merge
2h 16m
Merged PRs (30d)
1

Description

With @asuessenbach working hard on unifying the framework I was wondering if we could agree on some naming schema for the different binding types.

Using types aliases already makes things a lot easier to read like this:

```cpp
// Usings
using BufferAllocationC = BufferAllocation;
using BufferAllocationCpp = BufferAllocation;

// Usage
vkb::BufferAllocationC do_something();
vkb::BufferAllocationCpp do_something();
```

Maybe we can improve upon this a little bit by having the C-Binding be the default, and the only suffixing the C++ one?

Like this:

```cpp
// Usings
using BufferAllocation = BufferAllocation;
using BufferAllocationCpp = BufferAllocation;

// Usage
vkb::BufferAllocation do_something();
vkb::BufferAllocationCpp do_something();
```

Just some food for thought and maybe something we can discuss on the next call.

Contributor guide

Open the contributing guide

Research direction

Review the BufferAllocation aliases and BindingType::C/Cpp examples shown in the issue. The first step is to establish agreement on a naming convention; done would require a decided schema and consistent application, but the issue does not identify files, tests, or a concrete implementation scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.