Vulkan-Samples icon indicating copy to clipboard operation
Vulkan-Samples copied to clipboard

[Suggestion] Naming schema for different binding types

Open SaschaWillems opened this issue 1 year ago • 2 comments

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:

// Usings
using BufferAllocationC   = BufferAllocation<vkb::BindingType::C>;
using BufferAllocationCpp = BufferAllocation<vkb::BindingType::Cpp>;

// 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:

// Usings
using BufferAllocation   = BufferAllocation<vkb::BindingType::C>;
using BufferAllocationCpp = BufferAllocation<vkb::BindingType::Cpp>;

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

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

SaschaWillems avatar Jul 09 '24 18:07 SaschaWillems

Agreed, this would make it more readable

tomadamatkinson avatar Jul 09 '24 18:07 tomadamatkinson

No problem, if the consensus is to use that naming scheme, I can adjust #1085 accordingly.

asuessenbach avatar Jul 15 '24 08:07 asuessenbach