News for hackers. Stuff that matters.
Re:V (Vlang) 0.2 by dgb23 on Tuesday December 22, 2020 @04:41PM (#25511615)
This sounds interesting. I would love to understand how autofree decides what it can handle, and when ARC comes in.
Re:V (Vlang) 0.2 by amedvednikov on Tuesday December 22, 2020 @04:50PM (#25511692)
Check this test out:

https://github.com/vlang/v/blob/master/vlib/v/tests/valgrind...

It has lots of comments and will give you a good picture.

Re:V (Vlang) 0.2 by vlang1dot0 on Tuesday December 22, 2020 @07:19PM (#25513024)
I think having actual documentation about how the memory system is supposed to work would do a lot more to answer questions than linking to the tests.

For example:

x = [1, 2, 3] // is this stack or heap allocated?

foo(&x) // how does the compiler know if x needs to be ref counted or not?

return &x // is this valid or UB or a compilation error?