I have macros working in my Lisp, and used them to implement `add-method!', which I then used to implement `rest' parameters. And it only took 2 weeks of flailing about in confusion about what was supposed to be calling what!

(Previously: mastodon.vierkantor.com/@Vierk)

Follow

Now a big question is: should I make (generic) functions mutable objects, which means adding a method in one process can mess up another process, or rebind the name to a new generic function each time we add a method, causing slight identity crises?

· · Web · 1 · 0 · 0

Hmm, how evil would it be to have the new generic function returned by `generic:add-method' compare as equal to the original, even though it has more methods? 🤔

(In particular, you wouldn't quite be able to detect the difference in side-effect-free code, since the difference is one throws less errors than the other.)

Wait, no, you would be able to detect the difference (or the `=' relation is no longer transitive): start with one generic function, then add a method returning `0' in a specific case, then take the original and add a method returning `1' in that specific case. So new0 = original = new1, but they return different values.

hmm hmm hmm.

Sign in to participate in the conversation
Vachtnoes

Mastodon is a server for a federated social network: everyone can run a server if they want to, including me. So this is a Mastodon server for me (Vierkantor) and my friends.