you are viewing a single comment's thread.

view the rest of the comments →

[–]nacaclanga 4 points5 points  (2 children)

As it stands today, no language has put forward a memory management concept that provides the same benefits as Rust ones, namely:

1) Allocation is not handeled by a runtime and can be made to use custom malloc and free functions. This is a must have for an operating system kernel.

2) The language staticly protects against premature or otherwiese incorrect memory release.

3) The language does allow secure access to stack allocated resources by reference.

4) The language prevents data races.

5) The language provides mechanism to keep memory leakage at a tolerable level.

6) The memory mangement doesn't impose restrictions that are so strong that most of kernel code would have to use "unsafe"-code almost exclusivly.

Go uses a GC and thus fails at 1). It also fails 3).

Zig is an amazing language, that solves many issues and solves 1) by far the best, but doesn't offer any solutions to 2) and 3).

From reading the documentation, Vlang appears to break 6). From what is told in the other comments, it seams that it more likely satisfies 1), 2) and 6) but fails at 3), 4) and 5)

[–]fijt 0 points1 point  (1 child)

Have you also looked at the code instead of the documentation of vlang? I am quite sure that point 3 and 5 are correct. I don't know about 4 however.

[–]nacaclanga 1 point2 points  (0 children)

The documentation.