News for hackers. Stuff that matters.
Re:Ask HN: Faster than C, simpler than Python, safer than Ru... by gridlocdev on Saturday March 04, 2023 @12:02AM (#35018350)
I’m pretty optimistic about V, it so far has great language ergonomics, solid performance, and memory safety through its “autofree” memory feature flag. https://vlang.io/
Re:Ask HN: Faster than C, simpler than Python, safer than Ru... by avinassh on Saturday March 04, 2023 @10:48AM (#35021643)
how does the scoping works? From the homepage:

    import os

    text := os.read_file('app.log') or {
        eprintln('failed to read the file: ${err}')
        return
    }

    lines := text.split_into_lines()
    for line in lines {
        if line.starts_with('DEBUG:') {
            println(line)
        }
    }
Is lines empty or program exited after the error at `app.log`
Re:Ask HN: Faster than C, simpler than Python, safer than Ru... by amedvednikov on Thursday March 09, 2023 @11:54AM (#35083410)
If there's an error at reading app.log, the error is printed, and the function is returned.

Code after that won't run at all.

Re:Ask HN: Faster than C, simpler than Python, safer than Ru... by Tozen on Tuesday March 07, 2023 @07:58AM (#35054796)
V is progressing well, but in beta. It has to maintain its momentum and focus, without getting derailed, and deliver a polished useable 1.0 release.

> ...memory safety through its “autofree” memory feature

V has different memory management options, which can be turned off and the libraries don't depend on them. GC (default and optional), autofree, arena allocator (prealloc), or manual. This is mentioned in the documentation (https://github.com/vlang/v/blob/master/doc/docs.md). It has numerous safety features, as part of its design, and coupled with the GC (default) or autofree, would provide significant memory safety.