Skip to content

Proposal: make FHIRPrimitiveType inherit Sendable #38

Closed

Description

@lukaskollmer

i'd like to propose the FHIRPrimitiveType protocol be rewritten to the following:

public protocol FHIRPrimitiveType: FHIRType, Sendable, SendableMetatype {}

(it is currently defined to inherit just from FHIRType.)

since all types that conform to FHIRPrimitiveType are, as the name already suggests, "primitive" types, they will all trivially be able to conform to Sendable.

in fact, all types conforming to FHIRPrimitiveType currently already are capable of being Sendable (though only some of them actually state this as an explicit conformance; changing all six definitions of FHIRPrimitiveType (across the different targets) to the definition above does not require any additional changes to keep the package compiling, and all tests continue to pass without issues.

additionally, as part of this change, we should also add a SendableMetatype conformance, to make it easier to use these types in generic contexts.

Activity

  1. self-assigned this
    on Oct 28, 2025
  2. added
    enhancement
    on Oct 28, 2025
  3. added a commit that references this issue on Dec 24, 2025
    a053922
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions