Changing exercises to use generics

Several exercises focus on data structures. Some assume the data is int (binary search tree, simple linked list) while others ask you to store any (double linked list).

To modernize the track, I am considering updating some (all?) of those exercises to use a generic T comparable. This would invalidate all prior solutions.

Any thoughts on this?

Is there a concept exercise about generics in Go? That would be the first thing to implement IMO

There is not. Though there are probably multiple concepts required by practice exercises that aren’t covered by the syllabus :smiley:

I may take a stab at a generic concept with some AI help.

Generics concept: https://github.com/exercism/go/pull/3182

I personally would not use generics in all exercises. For many people generics add at least one level of additional difficulty.

1 Like

I’ve solved a generic version as a separate challenge and found it worthwhile. To me it feels like a different exercise though, as you’re learning both the data structure and generics, so I’d lean towards keeping it separate rather than replacing the existing exercises.