apple / swift-system

Low-level system calls and types for Swift
Apache License 2.0
1.18k stars 102 forks source link

Mach.Port: Tidiness #121

Closed loffgren closed 1 year ago

loffgren commented 1 year ago
karwa commented 1 year ago

Nit: I believe this repo (like most apple repos) uses explicit access control for every symbol. There are public extensions in this file (lines 137, 284, 320 in the OG), which expose initialisers and such. They seem to be the first use of extension-wide access control in this repository. I believe the preferred approach is to annotate each public symbol individually, although it is best to check (pinging @lorentey).

Additionally, this is a generic type. Nothing in the implementation is @inlinable, so everything will go through unspecialised generic dispatch, which typically comes with a significant performance cost. If the lack of @inlinable is intentional, it may be worth a comment; otherwise, it may be worth annotating as appropriate.

loffgren commented 1 year ago

@swift-ci test

loffgren commented 1 year ago

@swift-ci test