Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ObservableMacro Comment for Clarity on Struct Support #70190

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ojun9
Copy link
Contributor

@ojun9 ojun9 commented Dec 3, 2023

What's in this pull request?

This PR updates the comment in ObservableMacro.swift regarding the support of structs with the Observable macro. The original comment suggested that support for structs might be added in the future, which could potentially lead to misunderstandings among developers about the current and future capabilities of the framework.

Description of Changes

The comment at line 212 in ObservableMacro.swift has been updated to more accurately reflect the current state of struct support. The updated comment is as follows:

// structs are currently not supported due to copying/mutation semantics. 
// future support will depend on ongoing discussions and feasibility.

This change aims to provide clearer and more precise information to developers, helping them understand the present limitations and the context in which future support might be considered.

Rationale

The motivation for this change stems from discussions in the Swift community and the existing ambiguity surrounding the support of structs in the Observation framework. By clarifying the current state and potential future of struct support, this update seeks to align the comment with the ongoing technical discussions and considerations within the community. For further context, refer to the related discussion on the Swift forums: Swift Forum Discussion Link.

Resolves #70026

@ojun9
Copy link
Contributor Author

ojun9 commented Dec 3, 2023

@swift-ci please test

@ojun9
Copy link
Contributor Author

ojun9 commented Jan 4, 2024

Hello @rjmccall,

I hope this message finds you well. This PR primarily involves changes to the code comments, aiming to enhance clarity and readability. I understand you are quite busy, but I would greatly appreciate it if you could review it at your convenience.

Any feedback or general advice on the PR would be immensely valuable to me. Thank you in advance for your time and assistance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Revising Observable Macro Comment for Struct Support in Swift
1 participant