vlang / vlang/website

Explain memory safety more

Open
#129 1 comment 26 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
67
Forks
101
PR merge metrics
No merged PRs in 30d

Description

The main thing that confused me when reading through docs is the memory safety.

It mentions some cool things:

  • There's no garbage collection or reference counting
  • V cleans everything up during compilation
  • If your V program compiles, it's guaranteed that it's going to be leak free

I'm not an expert about this, so I got a bit confused. Rust had to make some substantial language changes compared to most languages to achieve this (and then still has Rc wrapper). And not a lot of other languages have managed.

So how exactly does it work in V? The docs don't mention much in the way of language changes to support this. What's the difference with Go that V can do this and Go can't?

I was going to experiment to figure it out, but ran into problems (can't mutate list arguments, another program failed to compile). So I'll post it here - I bet I'm not the only one interested in info.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked V documentation and review its claims about garbage collection, reference counting, compilation cleanup, and leak freedom. Compare the explanation with the issue's questions about Rust and Go. Done means the documentation clearly explains how V achieves memory safety and addresses the reported confusion.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.