I'm making a library where I have the following macro:
(define-syntax (define-dataframe stx) (syntax-case stx () [(_ name args ...) (with-syntax ([name-string (symbol->string (format-symbol "~a" #'name))]) #'(begin (define name (make-dataframe name-string args ...)) (will-register (database-will-executor) name-string database-garbage-collect!)))]))
An alternative technique would be to hijack the main
define macro and add a clause that does what I want. But that might come back to bite me later? What is the better practice for library APIs?