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

Convert ArrayDataSource to be class #1

Merged
merged 1 commit into from May 3, 2019
Merged

Conversation

JosephDuffy
Copy link
Contributor

This allows for an init(elements:) initialiser

This allows for an `init(elements:)` initialiser
@shaps80
Copy link
Contributor

shaps80 commented Apr 12, 2019

Makes sense but I loved your typealias suggestion.

@JosephDuffy
Copy link
Contributor Author

Makes sense but I loved your typealias suggestion.

It does work for some scenarios but I've found it to be a little restrictive in some cases, such as when wanting to add new functions.

I have done a couple of typealias -> class conversions in GatheredKit when I wanted to add more functions/properties. It also allows for explicit open/public scoping.

Overall I think that moving to a class is a better option in this scenario, but agree that a typealias is good for a lot of scenarios too.

@shaps80 shaps80 merged commit 821675e into master May 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants