-
-
Notifications
You must be signed in to change notification settings - Fork 162
[New Exercise] Add word-search exercise #867
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
Conversation
Hello 👋 Thanks for your PR. This repo does not currently have dedicated maintainers. Our cross-track maintainers team will attempt to review and merge your PR, but it will likely take longer for your PR to be reviewed. If you enjoy contributing to Exercism and have a track-record of doing so successfully, you might like to become an Exercism maintainer for this track. Please feel free to ask any questions, or chat to us about anything to do with this PR or the reviewing process on the Exercism forum. (cc @exercism/cross-track-maintainers) |
config.json
Outdated
"uuid": "e88da49b-37d7-4f84-ad64-765fb464a721", | ||
"practices": [], | ||
"prerequisites": [], | ||
"difficulty": 4, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would increase the difficulty to at least 5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. Done.
} | ||
} | ||
|
||
extension WordLocation { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get the idea that putting this in the source file would clutter it quite a bit.
I think a better approach would be to put this whole struct as a whole in a separate source file. As you can see being done here: https://github.com/exercism/swift/tree/main/exercises/practice/saddle-points/Sources/SaddlePoints.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get the idea that putting this in the source file would clutter it quite a bit.
The idea here is slightly different. Sometimes, you need a helper function specifically for testing, and you don’t want it to be part of the main codebase. In this case, it’s a fileprivate extension to the WordLocation struct that provides an alternative initializer used only for tests. That’s why it was located in a test file and was marked as fileprivate.
Now, I think it would be a good idea not to pollute the template.swift with this extension. Instead, I moved it to a separate file within the Tests module.
I think a better approach would be to put this whole struct as a whole in a separate source file.
That looks much more natural. Done.
No description provided.