On all-lower-case readability

Đang mở
#91 2 bình luận 5 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
csharp
Lĩnh vực
developer-experience

Hướng nghiên cứu

Bắt đầu với quy ước đặt tên được liên kết trong issue và so sánh quy ước đó với ví dụ sử dụng Unity, đặc biệt là cách viết hoa viết thường lẫn lộn và những tên như lengthsq. Xác định xem mối quan ngại này có yêu cầu một thay đổi tên cụ thể hay chỉ ghi nhận phản hồi về khả năng sử dụng; công việc được xem là hoàn tất khi phạm vi và quyết định của maintainer đã được thống nhất.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
C#
Star
1.4k
Fork
159
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Unity-Technologies/Unity.Mathematics

Tất cả issue của Unity-Technologies/Unity.Mathematics

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.