Comment

Comment by masijo

I agree with your criticism but those "mistakes" sadly come with inheriting implementation details of the hosted environment. As far as I understand, ClojureScript couldn't workaround some JavaScript limitations regarding macros and thus had to go with `:require-macros`.

A workaround is using Reader Conditionals (https://clojure.org/reference/reader#_reader_conditionals) and specifying platform differences where they matter, but it's awkward to say the least. What most projects do is to separate "common" namespaces and use the `.cljc` extension to indicate they're multi platform, and keep platform specific things in namespaces with `.clj`, `.cljs`, etc.

parent masijo 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton