exercism / exercism/go

Improve learning experience for interfaces, errors and error wrapping

Open
#2,492 2 comments 0 reactions 1 assignee Claimed by @junedev View on GitHub
x:rep/medium
Dominant language
Go
Stars
1.2k
Forks
686
Avg merge
54m
Merged PRs (30d)
1

Description

[This is a dummy issue for now to keep track of this improvement idea. More detailed issues that can be worked on will be created later. If someone wants to work beforehand, please comment below and we can discuss.]

In JavaScript, teaching inheritance together with errors works very well which is why I thought a similar combination might work out in Go. But I think it's not working very well, interfaces are quite a big topic in Go so we currently only scratch the surface in the existing "The Farm" exercise. We don't practice creating an interface currently, people don't understand the difference between unwrapping an error and not unwrapping, etc. To fix this I think it would be good to have one exercise to teach interfaces with tasks that include creating and interface and using an existing one etc. Then we can have an errors concept that includes error wrapping and shows unwrapping and not unwrapping in error handling "side by side" so people better understand the difference and can practice in the exercise. The new interfaces exercise will then be a prerequisite for the errors exercise.

Sequence:
- [x] Create new separate exercise for interfaces
- [x] Remove learning interfaces from the errors exercise
- [x] Simplify existing error concept and exercise
- [ ] Create new error wrapping concept and exercise

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.