Re: Too many global variables in a generated js-code

2017-09-18 Thread alexsad
@HBehrens - thanks a lot! This is very helpful.

Re: Too many global variables in a generated js-code

2017-09-18 Thread alexsad
@Araq - thanks. I like it that from more Nim modules compile along js file. I have known it. I will try to find workround to run two or more js in the same time. Then I will post. ...and sorry for my english.

Re: Too many global variables in a generated js-code

2017-09-15 Thread Araq
Yeah ok, you can only compile a single Nim program to JS. But that program can consist of as many Nim modules as necessary.

Re: Too many global variables in a generated js-code

2017-09-15 Thread Tiberium
@alexsad - don't try to compare JS code compiled by Nim with hand-written JS. It's almost the same if you compare hand-written C++ with C++ code compiled by Nim

Re: Too many global variables in a generated js-code

2017-09-15 Thread Araq
I've heard assembler is very unsafe and low level -- is asm generation possible to avoid with GCC?

Too many global variables in a generated js-code

2017-09-15 Thread alexsad
After compilation to js and run it in the browser I see in developer tools that window object has many variables. You can also detect them in [https://nim-lang.org/docs/theindex.html](https://nim-lang.org/docs/theindex.html) [I've heard global variables are