Live data from Hacker News

V compile time memory management:Running the Ved-editor on 8MB file with 0 leaks

youtube.com

21–23 of 23 posts

Re: V compile time memory management:Running the Ved-editor on 8MB file with 0 leaks

#21
post #17

I still don’t fully understand the memory management side V. From what I’ve seen V takes a similar route as Nim’s recent ORC feature ( https://nim-lang.org/docs/destructors.html#move-semantics ), which automatically inserts destructor calls using move semantics. The question is, is there a similar move semantic model in V akin to C++ and Nim, or does it work in a totally different way? This wasn’t clear when reading…

vlang uses Lobster's memory management model: RC, eliminating as many increments and decrements as possible with some static analysis. Lobster was able to eliminate 95% RC ops with some extra monomorphization, so I'm guessing vlang is close to that.

Yes, I'd also say 90-100%

Re: V compile time memory management:Running the Ved-editor on 8MB file with 0 leaks

#22
post #19

Earlier quoted context omitted.

Even garbage collected languages do not prevent leaking memory because doing so requires understanding programmer intent. For example, adding objects to a static hash map and never using them is a memory leak that no GC will fix. V has the same issue and autofree will not be able to fix it. Reference counting is also necessary even in entirely single threaded programs to handle some situations. It's concerning you st…

Your comment, while true, is too pedantic to be useful. No language I've ever seen can prevent that broader definition of memory leaks, so it's not a useful distinction to make when comparing languages.

Ok but then the author should not be claiming that.

The problem with V is that the author makes astounding claims and when people push back on that even slightly they get harassed. Even your comment nit-picks mine over technicalities while ignoring the obvious issues with the author's.

Given how many of the "features" of V are completely unimplemented or only work in the most narrow of edge cases, it's not clear to me why so much grace is extended to the author who's generally been unable to deliver his promises all while collecting a tidy sum on patreon.

Re: V compile time memory management:Running the Ved-editor on 8MB file with 0 leaks

#23
post #19

Earlier quoted context omitted.

Your comment, while true, is too pedantic to be useful. No language I've ever seen can prevent that broader definition of memory leaks, so it's not a useful distinction to make when comparing languages.

Ok but then the author should not be claiming that. The problem with V is that the author makes astounding claims and when people push back on that even slightly they get harassed. Even your comment nit-picks mine over technicalities while ignoring the obvious issues with the author's. Given how many of the "features" of V are completely unimplemented or only work in the most narrow of edge cases, it's not clear to m…

[deleted]
Post reply on HN