Maybe this project had a rough start, but right now anyone claiming this is not real should probably re-evaluate those feelings.
Maybe this project had a rough start, but right now anyone claiming this is not real should probably re-evaluate those feelings.
- autofree not only leaks memory but in some cases causes double frees or use after free resulting in UB. Look at issues tagged autofree on their repo.
- No UB is claimed but the compiler does nothing to stop you from doing it and V is a very thin layer on top of C so it's trivial to cause UB. Signed integer overflow in V: instant UB.
- hot code reloading literally just overwrites the library in memory as the application is running. Better hope your compiler laid everything out exactly the same way or it will segfault and it usually does.
- Generics. Only one type argument is supported. The built in std types don't even use them because the implementation is so broken.
- option types: why have Some(T) | None when you can mix error handling in too and have Some(T) | None | Error(E)? That's right, option types three values. (Tri-state booleans anyone?)
- Compilation speed: V translates to C and then runs a C compiler. V isn't going to compile any faster than your C will. The only reasons that it's pretty fast right now are because most programs are very small and so is the std library and because they use tcc which performs no optimizations at all. If you want your C code to compile as fast as V does, just use tcc.
- Runtime speed: No rigorous benchmarks have been done. The claim of within 3% is a goal they have no idea how to achieve. Given their memory system relies on ref counting and optimizing out increments and decrements, they won't be able to hit that only taking memory management into account. Other design aspects have serious implications in terms of performance such as array copying being implicit. (b = a) copies all of a into a new array.
This is fine for a learning experience and I hope everyone involved is learning a lot but pitching this as some kind of project that people should learn and write real code in is crazy.
Why was it necessary to create a temporary account to write your post? I can probably guess who you are since there are only a few folks really vocal and on some kind of personal mission to shoot this down at every opportunity. What a waste of time. What a sad thing to do to an open source project.
Even for critical things like the memory management strategy, no one other than Alex has any idea how it is supposed to work (beyond some references to Lobster). Even when it's pointed out that Lobster makes some concessions that V does not so that the memory management system can work, there is still no discussion.
The V community and team seem far more interested in generating hype and publicity than actually doing the hard parts of language design.
I don't actually think the community is trying to be malicious. If you hang out in their discord, they're generally quite friendly. What they lack is focus.
The language and canonical backends aren't anywhere close to complete and there's already attention bring split to build an x86_64 backend and a wasm backend. Neither of these are anything more than toys even in comparison to the C one. At the same time, std is lacking critical things like a map type that doesn't require your keys to be strings. And yet they're working on a discord client and a websocket implementation. V-os and v-browser are seriously discussed with promises like "we'll start on that after 0.3".
V is sort of the ultimate yack shave. The author wanted to make a thin discord client but first they needed a new text editor so then they needed a language to write it in. It's really only a matter of time before the next project comes up and the author leaves V in the same state as his other projects.