by LorenDB · 3y ago · 0 comments
Maybe someday I should try learning V again. I was going to learn it over the summer of 2020 to expand my repertoire beyond C++, but I gave up fairly quickly and ended up learning Qt instead, which has proved to be a very wise choice - knowing Qt why I have my current job (for multiple reasons).
Seems to me they're trying to dog food the project which makes sense to me.
Why? Correct me if I’m wrong but this language has literally no unique attributes that would make it different than D or Go, so you won’t improve as a developer from it at all.
Not trying to dissuade you from it, afaik most of the initial false claims have been debunked and now V is a real thing, but what is left from it is.. really not that interesting to my eyes.
I'm not familiar with D, but compared to Golang, it seems to have a bunch of goodies compared to it. Small list: immutability by default for lots of things, no null, small and fast compiler, "4 ways to manage memory", hot code reloading and repl.
These are just the ones I could find on a quick skim, I'm sure there is more.
> Not trying to dissuade you from it
You are literally saying that it's not "interesting to my eyes" but then before that you say "you won’t improve as a developer from it at all", how is this not trying to dissuade someone?
Go's compiler is famously fast, isn't it? I don't know about small, but that only seems relevant if you're working on the compiler itself.
> "4 ways to manage memory"
People complain about D having 2 ways to manage memory, so isn't this twice as bad?
It does, a lot: https://vlang.io/compare#go
Adding some of that back to V only “fixes” where Go went wrong, so I would need something additional on top to consider this language.
Just for one thing: focus on simplicity and fast builds.
I'm intrigued that you compared V to D. I'm a huge fan of D, and I'd be interested in hearing why you made that comparison.
Not understanding the need to be dismissive of someone else's plans. Part of the fun of programming is checking things out, if we maintain an open-mind.
> this language has literally no unique attributes that would make it different than D or Go, so you won’t improve as a developer from it at all...
Such a statement can be perceived as highly inflammatory. V clearly has different features from D and Go. Additionally, V is among the most popular programming languages on GitHub[1], based on stars. And has been so for some years now. Other people clearly use and experiment with it. What you and I like, doesn't mean that others don't or can't have different preferences.
Such as? I’m open to changing my mind, but didn’t see anything notable on the official website’s listed differences between V and Go.
> Additionally, V is among the most popular programming languages on GitHub
Come on, not even you believe that! There are clearly more projects written in goddamn Coq out there than V, it is such a niche language currently..
V can produce JavaScript, and it has an interpreter, but those are pretty experimental features. V has built in markup templates (like Mustache but worse), basic built in JSON reflection (D's CTFE can implement this), and built in portable inline SQL (for some reason), but that might be less desirable than targeting one specific ORM with its entire feature set. V also has a built in Sokol shader compiler, and can run `.vsh` files in a special script mode that works very slightly differently than normal V, but those aren't exactly killer features compared to D imo.
To note, refereed link is only about the language repo and not as language used for making projects.
transpiling to C actually makes adoption much easier. if you create an entirely new compiler auditing and verifying that takes many years and tons of money before it can be used for anything serious.
Well, maybe.
I like transpiling to C because it brings with it all the hyper-optimisation that has gone into C compilers over decades.
As a solo on-again/off-again language designer, I can attest that you really cannot fixate on language purity or similar stuff like that: the goal is to write a program in your new language as soon as possible, and implement the features that motivated you to create a new language in the first place.
Transpiling to C is, in practice, no different from transpiling to assembler, with the advantage of portability and instant environment support (can call C libraries).
I've got a featurelist I'd like to implement. Focusing on emitting machine-code or assembly eats away valuable time I could have instead used to create a feature, or 10.
So showcasing what the language and compiler can do is a bad thing?
"They" are many different people (developers or contributors). As an open-source project, people focus on what they like or may need.
Furthermore, V has a native backend, in addition to others: C, JavaScript, WASM, etc... They've stated (on their website) that their plan is to eventually make the native backend the primary, as they close in on 1.0. The other backends can be seen, for those that have actually used or know of the language, by checking out the -b flag.
It is important to note that (at the time of writing this comment) the native backend can compile only three examples in the `examples/` directory in the V compiler codebase:
hello_world.v
fizz_buzz.v
rune.v
All the other examples fail to compile when V is used with the `-b native` flag.