atlas-engineer / nclasses

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

Add alias macros. #13

Closed aartaka closed 1 year ago

aartaka commented 1 year ago

In #12 I mentioned that it'd be nice to have consistent aliases for our DWIM macros. Two reasons for that:

So, for define-class, aliases would be define-class* (consistency) and defclass* (standard+*). defclass*, in particular, would be useful for backwards-compatibility with hu.dwim.defclass* and drop-in use.

The implementation is based on setting macro-function of the alias to the macro function of the original macro. This is convenient, because SLIME/SLY goes to the original macro when cross-referencing the alias, and documentation is fetched properly for the alias macros (EDIT: only on some implementations, thus the explicit (setf (documentation ...)) addition).

@Ambrevar, looks good? I think that after we merge (or reject) this, we can release 0.4.0—lots of new exciting stuff :D