I noticed that cljs.core redefines String.prototype.apply. Being new to
Clojure, I don't understand what this redefinition does or what it is
for. But I do know that redefining functions in the JS standard library,
or defining new ones on standard objects, is something that should be
done with great care, to avoid breaking other pieces of JavaScript
running in the same context (e.g. on the same page). (And lest you think
your JavaScript is sure to be the only JavaScript on your page, bear in
mind that some browsers make web pages accessible to blind users by
injecting their own JS into the page.)
I know there are always trade-offs. And perhaps this definition of
String.prototype.apply is known not to conflict with any other
JavaScript code. But I would appreciate an explanation of what purpose
it serves.
Thanks,
Matt
smime.p7s
Description: S/MIME Cryptographic Signature