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/
> ...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.
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`Code after that won't run at all.