atlas-engineer / nclasses

A `define-class` macro for less boilerplate
Other
7 stars 2 forks source link

Add `define-generic` macro. #11

Closed aartaka closed 1 year ago

aartaka commented 1 year ago

Simplifies lots of defgeneric instances.

Implemented without alex:parse-body, serapeum:unparse-lambda-list and other utilities, so may be slightly buggy. But, according to the spec, generic function arguments are processed properly and body is parsed in a more or less correct way.

aartaka commented 1 year ago

Example simplified, tests added, merging?

Ambrevar commented 1 year ago

Tests are not pasing on CCL :p

aartaka commented 1 year ago

On it :D

aartaka commented 1 year ago

So the problem was set-difference set order yet again :P

CCL fixed, CI passing, squashing and merging :)

Ambrevar commented 1 year ago

I remember the issue with set-difference, I thought there was a stable function in a popular library like Alexdandria or Serapeum, but I cannot find it anymore.

Serapeum has sera:stable-sort-new that addresses a similar problem.

aartaka commented 1 year ago

remove-if(-not) works alright for now :)