logoalt Hacker News

SkiFire13last Monday at 7:37 AM1 replyview on HN

> Then I thought: how hard is it to write this C++ static analyzer? Conceptually, I think it’s not hard. It requires going through the AST. And since the static analysis is mostly statically scoped, it doesn’t require heavy cross-file analysis.

How do you handle function lifetimes then? Those are generally non-local to infer, and Rust requires annotating functions with informations for that. I tried taking a look at the mako db's refactor but I didn't see any lifetime annotation being added there.


Replies

j16sdizlast Monday at 7:47 AM

It need new annotations. (see the paragraph under "Comment-Based Syntax")

show 1 reply