Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
build option: exported function naming conversion convention #320
In clojurescript (as in clojure and other lisps), it's common to name a function using
Can we get a build option that turns on automatic conversion of function names to the de facto standard of camelCase?
Exported names are 100% up to the author; people can write
If a tool is built to export to another language, it's not unreasonable to expect that care should be taken to default to the conventions of the community of that target language when it is the tool in question is responsible. If the shoe was on the other foot and clojurescript or clojure was the target language, I would imagine that users in this community would expect the same.
The name-mangling happens in the ClojureScript compiler.
Totally agree. It's just that the default used is kind of anti-social. I want to use mori and I'm playing around with it, but upon casually sharing it with others, the gut reaction, as stupid as it may be is "ewww"
"ClojureScript codebase A to reliably e.g. call exported functions defined in ClojureScript codebase B, without coordination about the name-mangling mode used when B was compiled."
Then don't make it an option then. Make it the only way in a future version. :) Developers who want to keep their existing JS api can change the exported values to be explicitly