v icon indicating copy to clipboard operation
v copied to clipboard

Compiler or not compiler

Open elastica9999 opened this issue 7 years ago • 2 comments

From the beginning of vlang I think about

  • Is vlang really a compiled language ? In fact to have a binary from v sources we need to use gcc or clang or whatever compiler v is trans-pilled to c and the c file is compiled
  • Is this c temp file will be removed ? For example, v compile straight to elf/mach-o/exe ?
  • I would be nice to have interpreter possibility (to fast prototyping) and then compiler to binary option Congratulations again for this project.

elastica9999 avatar Jul 02 '19 20:07 elastica9999

Yes, at the moment the published compiler is a source-to-source compiler (a.k.a. transpiler from V to C) but at least an x64 beck-end is in the working. Quoting from the V front page, Fast compilation section:

Direct machine code generation is at a very early stage. Right now only x64/Mach-O is supported. This means that for now emitting C has to be used. By the end of this year x64 generation should be stable enough.

MaD70 avatar Jul 03 '19 12:07 MaD70

The first 2 questions are answered on the website. The C option will always be there.

The interpreter would be useful, but definitely not happening this year, unless someone is willing to work on it.

medvednikov avatar Jul 03 '19 20:07 medvednikov