How do you handle function-like macros and concatenation? Also, both D and Zig seem to have switched to including a full C compiler instead due to issues with translating C source wise, is that a possible direction for this in V or is the source translation good enough?
Re:V 0.3
by amedvednikov on Saturday July 02, 2022 @11:38AM
(#31959935)
Macros are unwrapped by Clang when generating C AST.
No plans to support C compilation for now, translation works well enough.
Re:V 0.3
by psychoslave on Friday July 01, 2022 @09:32AM
(#31946097)
Was it tested on very huge code base like say, the Linux kernel?
Re:V 0.3
by amedvednikov on Friday July 01, 2022 @09:33AM
(#31946116)
DOOM is big but not huge.
So not yet.
But we are planning to translate SQLite soon and yes the Linux kernel at some point.
Re:V 0.3
by psychoslave on Friday July 01, 2022 @06:38PM
(#31953916)
Yes I didn't mean to down size the impressiveness of translating DOOM, congratulation for that.
I was just wondering to which scale it would stretch properly.
Thanks for your replies.
Linux kernel might be a tricky one with all the inline assembly code.
Re:V 0.3
by amedvednikov on Friday July 01, 2022 @10:19AM
(#31946742)
Luckily V supports inline assembly code! It's used a lot in Vinix.
Migrating older projects from C to a nicer newer language.
By moving from C to V you get rid of complex makefiles, headers (you get nice clean modules instead), you get a modern stdlib with strings etc (although C strings aren't converted to V strings by C2V yet), much easier cross compilation, etc.