kind2
kind2 copied to clipboard
Generated JS may conflict with JS default types
For instance, if I define a String object in kind (as in the stdlib), the compiled JS will generate a const String = ....
This overrides the default String object. If you are dealing with Kind2-only scripts or you don't use any method of String, it's not a problem. However, if you want to use your Kind2 generated script with anything else (like another third-party library that probably uses String), you will get an error.
Example:
A solution would be to generate namespaced and/or obfuscated symbols so that the conflict does not happen.