cljs-dev

ClojureScript compiler & std lib dev, https://clojurescript.org/community/dev
martinklepsch 2020-12-10T10:31:56.083500Z

Remind me, is dead code elimination possible with anything other than boolean values? e.g. a string? It seems like it’s not but just want to double check it’s not just by inability 😅

thheller 2020-12-10T11:14:20.084300Z

it is in general but not when using = or so since that uses cljs.core/truth?, identical? should work

mfikes 2020-12-10T18:28:38.085500Z

@martinklepsch If you are referring to DCE driven by :closure-defines this has a bit of info on the subject: https://clojurescript.org/reference/compiler-options#closure-defines

martinklepsch 2020-12-10T18:40:47.086400Z

@mfikes thanks! I tried with case but hadn’t considered cond + identical?