really wishing that python decorators behaved a little more like lisp macros

like. it’s *just* similar enough that my brain is understanding them.

but when I expect certain behavior I get slapped on the wrist.

Follow

@compufox i’m very FP brained so their semantics are up my alley; i'm curious if you could think of a simple enough example where a CL macro works differently in a way you like?

@aescling okay so. I thought that decorators did the thing like macros where they eval’d the code and returned the result in-place.

I had a decorator set up that I thought would define a consistent method name and run the decorated method inside it, running pre/post code around it.

that’s not the case. the method name is still the name of the decorated method.

I was able to get around it by like. Defining some metadata tags on the method that I can look for but like that ALSO feels weird and hacky but :neofox_think_googly:

@aescling in CL this would be trivial, just wrapping the macro body in a custom generated defun form

Sign in to participate in the conversation
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.