Unity-Technologies / Unity-Technologies/Unity.Mathematics
On all-lower-case readability
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 1.4k
- Forks
- 159
- PR merge metrics
- No merged PRs in 30d
Description
Hi! I understand the naming convention of all-lowercase provides the benefits as described here. As a counter-balancing point, I just wanted to provide my impression that usability is lowered though when it comes to Unity usage like this
var jobHandle = Entities
.WithName("RotationSpeedSystem_ForEach")
.ForEach((ref Rotation rotation, in RotationSpeed_ForEach rotationSpeed) =>
{
rotation.Value = math.mul
(
math.normalize(rotation.Value),
quaternion.AxisAngle(
math.up(),
rotationSpeed.RadiansPerSecond * deltaTime
)
);
})
.Schedule(inputDependencies);
... where now suddenly, functions are using different case rules. Generally, it's also harder to "parse" in your mind multiple words if they don't use camel-case, e.g. lengthsq contains both the plural "lengths" as well as the intended "length sq". Another stumbling block is generally to have some functions start with a lower-case (this flavor), and others with upper-case (classic Unity), as it makes it harder on the eye to understand what is a function during broad scanning.
Of course, those are just split-seconds reading stumbling blocks, but I'm having flashbacks to how the PHP language grew over time to make different functions use different underscore, case, or haystack-needle parameter ordering rules, increasing usability.
Again, I understand there are benefits to all-lower-case, so please just take it as it is, an impression from a developer, so you can better gauge the costs. The way you chose to do it may still be better in sum.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the naming convention linked in the issue and compare it with the Unity usage example, especially mixed casing and names such as lengthsq. Determine whether the concern calls for a specific naming change or only records usability feedback; done would require an agreed scope and maintainer decision.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- developer-experience
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100