Re: compiling to typescript

2019-11-07 Thread mratsim
But translating to high-level JS code would require to keep up with the new features (or babel) while compiling to low-level JS code is future proof. And Google Closure compiler works.

Re: compiling to typescript

2019-11-07 Thread kobi
I only meant that it is probably a more direct translation, and their full time employees are actively developing and working on optimizing etc. so Nim can benefit from that. I imagine in the future, instead of keeping up with js new features and possibly deprecations, no effort is being lost on

Re: compiling to typescript

2019-11-06 Thread Araq
It is **not** "generated semi-obfuscated code" it's just generated code. And producing more "human-like" code is _more_ effort, not less. > They also support newer versions of javascript like es2015, which are more > concise. So what? We don't need new JS features, we **compile to** JavaScript.

Re: compiling to typescript

2019-11-06 Thread mratsim
But we can already use Google Closure compiler. Also Nim is already readable and can already target WASM. I expect going to WASM through C or directly via LLVM is much more efficient. Javascript and Typescript probably lose all relevant type information, especially for integers and arrays. I ex

Re: compiling to typescript

2019-11-06 Thread kobi
instead of this generated semi-obfuscated code, you get idiomatic and readable code in the other language, and leave it to their compiler to make optimized js, perhaps they will have other targets like wasm in the future, so you can reuse their efforts/work-force advantage/features.

Re: compiling to typescript

2019-11-06 Thread SolitudeSF
whats the point? code produced by nim is not supposed to be read, unless for some edge case debugging.

compiling to typescript

2019-11-06 Thread kobi
Hello, I don't know if it has been asked before: nowadays, there are a few languages whose specialty is compiling to javascript, while at the same time are much closer to Nim in terms of semantics and features, notably typescript, and others like dart. typescript is backed by microsoft. Now tha