Hacker News new | ask | show | jobs
by hawkice 2326 days ago
Those fast compiles, fast speed, plus the feature list (standard generics and hot code reloading) make this look insanely cool! What's the secret sauce? The translation from C and compile being 25x faster than just compiling C seems nearly impossible.

Edit: sibling comment points out it may seem amazingly cool and nearly impossible because it does not, in fact, exist. How can we learn more about the feasibility of this living up to their claims?

3 comments

> What's the secret sauce?

Lies.

On a more serious note, compilers and programming languages take years to get into a usable state, and V very much in early stages of development, pre-pre-pre-alpha or similar quality. It is far from usable for any serious work at all. All the listed features are "planned features", many of which are not yet implementd or buggy. In other words, as development progresses, the author of V will realize that it is not easy to design/implement those features properly, otherwise every language would have that.

This has been discussed on HN several times before, and as far as I can tell most of the claims have been too good to be true. For a bit more nuanced review, Christine Dodrill has written posts on the topic, with this being the latest: https://christine.website/blog/v-vvork-in-progress-2020-01-0...
> The translation from C and compile being 25x faster than just compiling C seems nearly impossible.

It's easy to make a language that compiles faster than C. First get rid of the C preprocessor, and fix the syntax so it is easier to parse (e.g. `name: Type` rather than `Type name`). You can go even further and make it possible to parse each line independently (I think Zig does this?).

Second use a simple modern code generator that doesn't do much optimisation.