Fork me on GitHub
#cljs-dev
<
2022-02-11
>
dnolen13:02:45

not ambiguous

dnolen13:02:51

because macros must be tried first

borkdude14:02:32

What's the reason that this doesn't work in self-hosted?

cljs.user=> (defmacro foo [name] `(def ~name))
#'cljs.user/foo
cljs.user=> (foo x)
Use of undeclared Var cljs.user/x at line 1 

dnolen14:02:23

@borkdude intentionally not supported

borkdude14:02:31

any details on why?

borkdude14:02:48

I mean, it's fine by me, just learning about the trade-offs

dnolen15:02:55

@borkdude because it encourages writing incompatible stuff

quoll19:02:31

@dnolen There’s a couple of small changes on https://clojure.atlassian.net/browse/CLJS-3347 that are in a new patch, if you’re willing to apply it to that branch that you created for it? (is the process that I tell you about the patch?)

dnolen19:02:55

@quoll yes it's good to ping me about - will try to take a look soon

quoll19:02:25

Thank you

quoll19:02:43

Also, I created the https://clojure.atlassian.net/browse/CLJS-3348 ticket a little while ago to bring over some of the new Clojure 1.11 functions (not iteration, which Mike did). There’s a patch attached to that as well

borkdude22:02:51

Asking for clj-kondo, is this intentionally supported in CLJS?

(ns dude)

(def foo 1)
(let [bar #time/date foo]
  (prn bar))
if the time/date data reader is identity , what should the above return? @alexmiller has mentioned that data readers should read literals and one should not use reader functions for macro-like behavior_._ data_readers.cljc:
{time/date clojure.core/identity}
Related issue: https://github.com/clj-kondo/clj-kondo/issues/1579

dnolen23:02:32

@borkdude intention was for it to be just like Clojure (as much as can be allowed)