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

custom-set: change stub to make it compile. #425

Merged
merged 1 commit into from
Nov 8, 2016
Merged

custom-set: change stub to make it compile. #425

merged 1 commit into from
Nov 8, 2016

Conversation

rbasso
Copy link
Contributor

@rbasso rbasso commented Nov 8, 2016

This PR makes small changes to allow the stub solution to build and also compile the test suite.

The ability to run the tests with the stub solution is useful mainly for two reasons:

  • It allows us to assert that the stub solution is "correct".
  • It allows the students to have an easier start, also making it clear what needs to be implemented.

On the other hand, it has drawbacks:

  • We are forced to create a dummy data definition, which makes the exercise a little less challenging.
  • We cannot export the data constructors to the test suite, because they do not exist yet.

Considering that most of the students don't go too far in the track, I'm not too worried about the risk of making it too easy, so I think it is worthy to try this path.

Related to #421.

@petertseng
Copy link
Member

We are forced to create a dummy data definition, which makes the exercise a little less challenging

I don't think this is too serious. The student still has to figure out what they want the type to be, because they certainly won't be keeping the Dummy. So the only work we have relieved them of is the step of figuring out that we need to define the CustomSet type.

We cannot export the data constructors to the test suite, because they do not exist yet.

For this type CustomSet, a library writer might not want to export the data constructors anyway since it might show internal implementation details. So not being able to export constructors seems OK to me.

Regarding what a library writer might do, I think they would probably at least export CustomSet if not its constructors, otherwise nobody can refer to the type in a signature, etc. But it works for us since our tests don't refer to the type. I only make this comment because it's removed from the export list of the stub solution.

Overall, I feel the disadvantages pointed out are acceptable. The text in HINTS.md seems good. If you can't think of any other drawbacks I think we can get this moving.

@rbasso rbasso merged commit cc70708 into exercism:master Nov 8, 2016
@rbasso rbasso deleted the custom-set-stub-compilable branch November 8, 2016 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants