Alternative term for "non-ref `struct"

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

Maintainer thường phản hồi trong vòng 1 ngày

@jskeet đang làm issue này rồi.

Từ ngày 5/11/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

In reviewing #1817, we see that the term "non-ref struct" was used.

This relates to discussions on how we spec record types, and nullable reference types.

We'd like to avoid adding the term "non-ref struct" when we already have the long-used term "strut". In the same fashion, we want to avoid the terms "non-record class" and "non-record struct".

Finally, we should never introduce "non-ref, non-record struct".

To fix this, we want to do the following:

  • Use "class" and "struct" when it means all class types, and all struct types, respectively.
  • Define and use a different phrase consistently to mean "A class, excluding those with the record modifier".
  • Define and use a different phrase consistently to mean "A struct, excluding those with the record, ref or both those modifiers"

We can leverage the language for a "non-nullable class", if it applies.

Ngôn ngữ chính
C#
Star
818
Fork
100
Merge trung bình
3 ngày 13 giờ
Pull request đã merge (30 ngày)
21

Chuẩn bị môi trường

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 dotnet/csharpstandard

Tất cả issue của dotnet/csharpstandard

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.