common-lisp
common-lisp copied to clipboard
Add 'class/structure' concept & exercise
In https://exercism.org/tracks/common-lisp/about, the section "Key Feature of Common Lisp" says that Common Lisp can be written in 'object-oriented' style. So I think that users expect such concept related about object-oriented feature.
Definately a good idea - I think structures and classes probably should be handled separately.
I also wonder if even 'class' is too big of a concept? What is the minimal set of things we want to teach about classes or structures?
In my opinion,
- generic function
- method
- method combination
- multiple method
- class definition
- slot
- instance
- accessor
- inheritance
- multiple inheritance
That is a lot of stuff for a 'concept' exercise. Should we expose the student first to generic functions then classes or visa versa? (maybe the latter...) then method combinations, inheritance (including multiple) could be taught next.
The goal of concept exercises is to be small and focused, should teach the student "one" thing.
For reference:
I think we'll need to split this idea into several parts... Perhaps a partitioning of:
- classes
- generic functions
- structures
These should be kept relatively simple and later more advanced concepts could get into things like say... method combinations, specializating on initialize-instance etc.