Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

def meta should be evaluated and support arbitrary values #197

Open
frenchy64 opened this issue Jan 29, 2025 · 1 comment
Open

def meta should be evaluated and support arbitrary values #197

frenchy64 opened this issue Jan 29, 2025 · 1 comment

Comments

@frenchy64
Copy link
Contributor

frenchy64 commented Jan 29, 2025

At least if we want Clojure parity, not sure if CLJS does this. clojure.test/deftest uses this.

;jank
clojure.core=> (def ^{:test (fn [])} a)
#'clojure.core/a
clojure.core=> (-> #'a meta :test)
(fn [])

;clj
user=> (def ^{:test (fn [])} a)
#'user/a
user=> (-> #'a meta :test)
#object[user$fn__134 0x4a05d8ae "user$fn__134@4a05d8ae"]

Can't set manually with alter-meta! either:

Exception: invalid meta: clojure.core/clojure_core-fn-4375 (jit_function@0x1117d2008)
@frenchy64 frenchy64 changed the title def meta should be evaluated def meta should be evaluated and support arbitrary values Jan 29, 2025
@jeaye
Copy link
Member

jeaye commented Jan 30, 2025

Yep, we should follow Clojure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants