KhronosGroup / Vulkan-Samples

One stop solution for all Vulkan samples
Apache License 2.0
4.23k stars 634 forks source link

[Suggestion] Naming schema for different binding types #1093

Open SaschaWillems opened 2 months ago

SaschaWillems commented 2 months ago

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.

tomadamatkinson commented 2 months ago

Agreed, this would make it more readable

asuessenbach commented 2 months ago

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