Live data from Hacker News

The V Programming Language

vlang.io

151–160 of 308 posts

Re: The V Programming Language

#152
post #142

Hm I looked around the repo, and there doesn't seem to be much there. $ find . -name '*.v'|xargs wc -l|sort -n ... 314 ./glm/glm.v 330 ./time/time.v 338 ./builtin/utf8.v 339 ./examples/tetris/tetris.v 490 ./os/os.v 630 ./compiler/scanner.v 644 ./compiler/table.v 712 ./gg/gg.v 814 ./builtin/string.v 845 ./compiler/main.v 848 ./compiler/fn.v 3216 ./compiler/parser.v 12573 total I'm a big fan of compact code, i.e. doing…

When I look at the great list of features, then actually look at all of this code written in V, I’m pretty underwhelmed. The code doesn’t look that much different from writing C, except it has more Go-like syntax. The language doesn’t seem to be assisting the writing of code very much, certainly not as much as claimed.

Re: The V Programming Language

#153
post #147

It's amazing that one person can do all this. It really takes a huge amount of dedication, knowledge and high IQ to invent a language from scratch alone. I think he is trying to Rustify Golang which is a thing I always wanted to do before giving up entirely on Golang.

When I saw your "Rustify" I assumed V has a borrow checker, which it turns out not to have.

Having immutable variables, no null type and option types is not enough to make a language Rust-like IMO because dozens of languages have those things.

ADDED. Now that I know more, I see you have a point: V and Rust are the only 2 languages I know that have immutable variables, no null type, option types and no automatic memory management (i.e., garbage collection): https://vlang.io/docs#memory

Re: The V Programming Language

#154
post #150
post #145

Earlier quoted context omitted.

Compared to Go, taken from [1] V is very similar to Go, and these are the things it improves upon: - No global state - No null - No undefined values - No err != nil checks (replaced by option types) - Immutability by default - Only one declaration style (a := 0) - Much smaller runtime - Much smaller binaries (a simple web server written in V is 65 KB vs 7 MB in Go) - Zero cost C interop - No GC - Much faster serializ…

> No GC How does that improve upon Go? Memory safety is much harder without a GC

Isn't it usually game programmers who advise against GC because you can't predict when it will run and the performance impact it will have.

Re: The V Programming Language

#155
post #150
post #145

Earlier quoted context omitted.

Compared to Go, taken from [1] V is very similar to Go, and these are the things it improves upon: - No global state - No null - No undefined values - No err != nil checks (replaced by option types) - Immutability by default - Only one declaration style (a := 0) - Much smaller runtime - Much smaller binaries (a simple web server written in V is 65 KB vs 7 MB in Go) - Zero cost C interop - No GC - Much faster serializ…

> No GC How does that improve upon Go? Memory safety is much harder without a GC

GCs are good for some things and bad for others. I wouldn’t want to write an OS with a GC but I also wouldn’t want to write a web server where I have to manually allocate and free memory. It’s all a trade off.

Re: The V Programming Language

#156
post #150
post #145

Earlier quoted context omitted.

Compared to Go, taken from [1] V is very similar to Go, and these are the things it improves upon: - No global state - No null - No undefined values - No err != nil checks (replaced by option types) - Immutability by default - Only one declaration style (a := 0) - Much smaller runtime - Much smaller binaries (a simple web server written in V is 65 KB vs 7 MB in Go) - Zero cost C interop - No GC - Much faster serializ…

> No GC How does that improve upon Go? Memory safety is much harder without a GC

It is not in my opinion. With modern development tools/frameworks providing memory leaks detection I have completely forgotten when was the last time that my programs leaked memory. And I write complex high performance game servers that run for months non stop. You just have to acquire certain culture/behavior when writing code.

Re: The V Programming Language

#157
post #142

Hm I looked around the repo, and there doesn't seem to be much there. $ find . -name '*.v'|xargs wc -l|sort -n ... 314 ./glm/glm.v 330 ./time/time.v 338 ./builtin/utf8.v 339 ./examples/tetris/tetris.v 490 ./os/os.v 630 ./compiler/scanner.v 644 ./compiler/table.v 712 ./gg/gg.v 814 ./builtin/string.v 845 ./compiler/main.v 848 ./compiler/fn.v 3216 ./compiler/parser.v 12573 total I'm a big fan of compact code, i.e. doing…

mkdir /var/tmp/vlang0.0.12 fixes the Segmentation fault for me

EDIT: Not needed anymore

Re: The V Programming Language

#160

[flagged]

Not a hater, but what was delivered was a 4K line parser and some wrapper functions over the C standard library. I know the author has said he’s got a lot of TODO work, and the source code says as much, but as a compiler writer myself, the current state of this is maybe a step ahead of an undergrad final project in imperative language implementation. It has some of the buzzwords of languages as of late, like Rust and Go, but it’s quick to see that the stated features are quite shallow (e.g., no participation of an advanced runtime like Go, or an advanced compiler like Rust’s).
Post reply on HN