Clojure (for JVM) handles code that contains emoji just fine, as shown in this example REPL session:
ClojureScript Compiler 1.9.495 (note: I selected 1.9.293 because 1.9.495, the currently released version, is not available)
I added a simple patch that fixes this problem. Also a test is added to verify the fix. I have already signed the Clojure CA.
To give an example of how emojis might be useful in ClojureScript, I am creating a web page using ClojureScript and I want to define a color scheme. I could use the “artist palette” emoji to refer to the color palette.
This allows the code to be used like this:
One could also take advantage of the colors to make the code easier to understand:
Current workaround: It is possible to use an emoji when referring to other namespaces, like this:
In this case, 🎨 can be used without generating a syntax error, because after compilation they will be replaced by mysite.theme.colors
Attached patch no longer applies cleanly.