common-lisp icon indicating copy to clipboard operation
common-lisp copied to clipboard

Add 'class/structure' concept & exercise

Open fu7mu4 opened this issue 3 years ago • 4 comments

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.

fu7mu4 avatar Sep 19 '21 12:09 fu7mu4

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?

verdammelt avatar Sep 19 '21 13:09 verdammelt

In my opinion,

  • generic function
  • method
  • method combination
  • multiple method
  • class definition
  • slot
  • instance
  • accessor
  • inheritance
  • multiple inheritance

fu7mu4 avatar Sep 19 '21 15:09 fu7mu4

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:

verdammelt avatar Sep 20 '21 12:09 verdammelt

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.

verdammelt avatar Oct 12 '21 02:10 verdammelt