
ClojureScript: Externs Inference - tosh
https://gist.github.com/swannodette/4fc9ccc13f62c66456daf19c47692799
======
drcode
ELI5: ClojureScript uses an advanced Google Javascript compiler that
eliminates dead code. To make that possible you have to be super careful about
how you reference external javascript libraries in your code, because these
will get sucked into the dead code elimination- Which is GOOD, because you
want to remove all the unused gunk from your libraries, but it's also BAD
because only advanced ClojureScript users could sometimes figure out how to
reference a new library.

This "externs inference" feature is the first step into automating the
importing of javascript libraries, in order to make the process easier.

~~~
dkersten
It's not just for dead code elimination that externs are needed but also for
identifier renaming (for minimisation).

This is a very welcome feature!

