About Roblox Naming Convention: "2d" or "2D"

In this roblox official guide: Roblox Lua Style guide

  • For acronyms within names, don’t capitalize the whole thing. For example, aJsonVariable or MakeHttpCall.
  • The exception to this is when the abbreviation represents a set. For example, in anRGBValue or GetXYZ. In these cases, RGB should be treated as an abbreviation of RedGreenBlue 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?

6 Likes

2D is in general spelled like that

2 Likes

You’re right, 2D is spelled like that.

2 Likes

You’re indeed right. 2D is actually spelled like that.

3 Likes

You’re absolutely right. 2D is always spelled like that.

3 Likes

You’re not telling lies, 2D is indeed in that order.

1 Like

Yes, yes. 2D is in fact spelled like that.

1 Like

Correct, I always spell 2D like that, and others do too.

1 Like

The majority of human life forms spell the term “Too-Dee” as “2D”, which is correct, while 0.01% of people (namely ROBLOX) use the spelling 2d, which would be incorrect.

Real, It is indeed spelled 2D by 99.99% of human life forms

1 Like

Agreed. Always spell it as 2D. Never considered spelling 2d another way.

2 Likes

Of course, 2D is most certainly spelled that way in, most indubiously.

1 Like

As a sane and oxygen breathing homo sapien i can assure thats ACTUALLY how 2D is spelled.

1 Like

Well, the council has spoken. “2D” just looks “right”.

1 Like