Why does the C# scripting libraries not conform to .NET naming convensions?

As a person new to Unity, but a seasoned .NET developer, I find it highly annoying that the library was not written to look like everything else provided by .NET.

.NET has had extensive documentation on naming guidelines since its introduction: Framework Design Guidelines | Microsoft Learn

I’m curious as to why it was designed this way? And I assume someone internal would have to answer the question :slight_smile:

As an example, it seems all public properties are lower cased, which mono.net and ms.net do not do.

Additionally, on the Renderer class, they have the isVisible property, and the enabled property which seems inconsistent. Why not name it isEnabled?

Because the C# naming conventions are really poor and limited.

Basically, they make everything public the same capitalization, which robs you of a lot of visual information.

There are a lot of good things in C#, but MSFT really dropped the ball on the naming conventions.

Game programmers tend to come from a much more eclectic background than .NET programmers. Many have used one of: LUA to write WorldOfWarCraft AddOns, or a various python-like in blender/Max/Gimp, or Ogre’s C++(?), or Torque’s Bash-like language, or one of the many versions of Flash-script. I’d guess many Unity C# programmers don’t even “think in” C#.

Having consistent naming isn’t as helpful to people who aren’t used to it and don’t expect it (and weren’t aware that there’s an official phrase for “try to pick names people will understand.”)

For the non-OP, C# is sort-of microsoft’s language, and microsoft is a big world. There are older, well-paid professionals who have never used a non-microsoft product. In the corporate world, you work 9 to 5; and if you follow all the programming rules, you can’t get into too much trouble. The OP isn’t nuts – just has a different background.

Enabled is writable: dog.enabled=true looks better to me than dog.isEnable=true. Whereas isVisible is read-only.