Hello, can someone explain what does "C and JavaScript backends" mean in the Key features of V? #20746
-
Hi, I'm new to programming. So, I don't quite understand what it is mean. Can someone please explain it to me? Thank you (^‿^) 🙏 Have a nice day. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
By default, the V compiler outputs C code, then calls the C compiler for you to create the final binary, shared library, or whatever you told it to create. It then deletes the C code to clean up disk space. You can also tell V to output the C code then stop. This is useful if you want to examine the C code itself, port to systems V doesn't currently support, etc. V can also output JavaScript instead of C, which can be used with node, run in the browser, etc. Last, there are other backends, such as the The goal, once the |
Beta Was this translation helpful? Give feedback.
-
It should be noted that V's JavaScript and WASM backends are significantly usable, though not yet complete. Depending on what a person is doing, they can compile/create working programs in those target languages. With Go, seems to be a bit of a different situation, where people might want to look more at Go2V (along with C2V). |
Beta Was this translation helpful? Give feedback.
By default, the V compiler outputs C code, then calls the C compiler for you to create the final binary, shared library, or whatever you told it to create. It then deletes the C code to clean up disk space.
You can also tell V to output the C code then stop. This is useful if you want to examine the C code itself, port to systems V doesn't currently support, etc.
V can also output JavaScript instead of C, which can be used with node, run in the browser, etc.
Last, there are other backends, such as the
native
backend (V compiles directly to a native executable, with no other compilers involved),WASM
(Web Assembly), aGo
backend, and someone was working on a FreePascal backend. None of the…