3 ms·
Having all those globals in the code generated by the Nim compiler seems less than ideal, though. Especially since some of them have very generic names like "ra
by ptx 5y ago
Having all those globals in the code generated by the Nim compiler seems less than ideal, though. Especially since some of them have very generic names like "raiseException" and "addInt", which could conceivably conflict with some other JS library.
- sedatk 5y agoIsn't that more on the library that has globals registered rather than the application which isn't supposed to be shared?
- ptx 5y agoYes, Nim being the library in this case. These names are not defined by the application but are part of the code that the Nim compiler generates for any application. If you wanted to integrate some Nim code in an existing JS application and your existing application already defines the name "raiseException", or "unhandledException", or "framePtr", or "lastJSError", or ... that's going to be a problem.
- sedatk 5y agoYou're right about that. Nim compiler needs better isolation. I thought you were talking about the web app.