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

Add Weak #17

Closed
fredpi opened this issue Mar 19, 2018 · 2 comments
Closed

Add Weak #17

fredpi opened this issue Mar 19, 2018 · 2 comments

Comments

@fredpi
Copy link
Contributor

fredpi commented Mar 19, 2018

I suggest adding a Weak wrapper alongside the Mutable wrapper requested here.

Suggested Implementation can be found here.

@Jeehut
Copy link
Member

Jeehut commented Mar 22, 2018

Could you please explain, how this would improve Swift with some usage examples and why you think "it should have been part of the Swift Standard Library"? Also, could you check if there were discussions about this (or something solving the same problem) at the new Swift Evolution Forum and link it here, if you can find it? Thank you in advance.

@fredpi
Copy link
Contributor Author

fredpi commented Apr 8, 2018

In fact there is a discussion on this matter.

While some argue Weak is often useful in many projects, general consensus seems to be it doesn't fit into the standard library, as the "weak reference status" of a property should be a property of this property instead of a new type somehow...

This makes sense, and since I'd be against adding it to the standard library with this in mind, it doesn't fit here either. Closing...

@fredpi fredpi closed this as completed Apr 8, 2018
@fredpi fredpi mentioned this issue Apr 8, 2018
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

No branches or pull requests

2 participants