Inconsistent Roblox styling? Preferences? Advantages, disadvantages?

I have recently changed up my style to use camelCase for keys and module functions as opposed to PascalCase. This is in accordance with the Roblox Luau style guide found here:

But, in the actual documentation, examples are the opposite. For example, the code here:

-- Dictionary table
local characterData = {
	CharName = "Diva Dragonslayer",
	CharClass = "Rogue"
}

…keys are written in PascalCase! Now I know why I was doing it like that before!

I find that camelCase makes differentiating between Roblox classes and user-created classes easier, (ex. part:Destroy() versus myClass:destroy()), but it has been awkward for tables of instances (ex. {part = game.Workspace.Part} “feels” weird, but {Part = game.Workspace.Part} “feels” better).

What do you all use? What are the advantages and disadvantages? Some might argue it doesn’t matter, but I am curious to learn from you all if you have a preference.

I should also note that I have never seen this style guide referenced anywhere else in documentation, and the Github repo it links to on the website has been removed, so I have no idea if the aforementioned guide is even in effect…?

Well, considering the guide also says this:
image
I wouldn’t rule out that it’s severely outdated and teaches bad practice.

Anyways, I use camelCase for almost everything.

1 Like

I missed that, and that makes sense. I don’t like camelCase but it might be the way…

i can’t remember the last time i used ipairs or pairs

i use camelCase like 99% of the time except when im too lazy and just don’t capitalize anything, or the first word is an acronym and i capitalize it

1 Like