←back to thread

My Foray into Vlang

(kristun.dev)
87 points Bogdanp | 1 comments | | HN request time: 0s | source
Show context
Athas ◴[] No.45081789[source]
This blog post showcases V in a positive light. I suppose it is good that people can have productive experiences with it now, although I don't see from this post why it is a significant improvement on Go.

The problems discussed (performance, compiler fragility) are somewhat worrying though. My impression is still that V is not particularly robust and focuses on flashy things instead of getting the basics right. I must admit that it is however still hard to look at V objectively, given the near-fradulent presentation it had when it was first announced.

replies(2): >>45087935 #>>45088055 #
theamk ◴[] No.45087935[source]
"near-fradulent presentation it had when it was first announced"?

It's not just in the past, the lies are still here. A very simple to explain example: https://vlang.io/ proudly says "No null (allowed in unsafe code)", while going to V playground and typing

    x := []&int { len: 10, cap: 0 }; println(x[4])
still prints "&nil" (note how there is no unsafe in sight).

The V team are either intentionally misleading people or have only vague idea about how languages are designed. Stay away.

replies(2): >>45088899 #>>45108331 #
1. baranul ◴[] No.45088899[source]
Such code will generate warnings, "arrays of references need to be initialized right away, therefore `len:` cannot be used (unless inside `unsafe`, or if you also use `init:`)". By the way, the other optional parameter, besides `len` and `cap`, is `init` (in the documentation too). The person is being told to use unsafe or do something else.

Warnings are given to allow the programmer to experiment or solve by other methods. Beta means language still in development. Lastly and for V, the warnings mean that in production mode (-prod flag), that kind of code will not compile.