Fork me on GitHub
#cljs-dev
<
2020-12-10
>
martinklepsch10:12:56

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 😅

thheller11:12:20

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

mfikes18:12:38

@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

martinklepsch18:12:47

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