In this roblox official guide: Roblox Lua Style guide
- For acronyms within names, don’t capitalize the whole thing. For example,
aJsonVariable
orMakeHttpCall
.- The exception to this is when the abbreviation represents a set. For example, in
anRGBValue
orGetXYZ
. In these cases,RGB
should be treated as an abbreviation ofRedGreenBlue
and not as an acronym.
So, I think that capitalizing “2D” is correct, but there are exceptions in Roblox.
GuiBase2d
and GuiBase3d
are not capitalized.
Roblox naming does not always follow Roblox’s Lua style guide, especially for older names.
Therefore, I can choose “2d” although it does not follow the Roblox Lua style, by regarding “Dimension” as an exception for compatibility.
However, there is another exception: Motor6D
, where “D” is capitalized.
I cannot determine what “D” in Motor6D
means,
but in this case, “D” is capitalized.
I have been considering naming my custom enum “Face2D” or “Face2d”.
Can you guys help me choose one of these?