News for hackers. Stuff that matters.
Re:Something Secret This Way Comes by Manishearth on Sunday April 24, 2016 @05:20AM (#11559072)
It's half a lint. It collects metadata about the code, making it easier to do whole-program analysis. Most of the lints we have so far do at most whole-function analysis. The other half, to be written, would use the metadata to lint things. "Can never panic" is one such lint that could be written with this for example.

As an optimization pass it would have to actually change the generated code. It doesn't affect that (nor does Rust's plugin lint functionality; which it uses; let you do that)

Re:Something Secret This Way Comes by sievebrain on Sunday April 24, 2016 @05:59AM (#11559143)
This sounds like a component of the type of tool normally called a static analysis engine. "Lint" to me implies more of a lightweight tool that complains about tabs vs spaces and things like that.
Re:Something Secret This Way Comes by llogiq on Sunday April 24, 2016 @06:19AM (#11559176)
I just call it a lint because it uses the rustic::lint API. And I posited that such analysis belongs in the compiler.

However, lints no longer need to be lightweight; I've seen full-program analysis passes called lints. And in rust, lints usually don't complain about tabs/spaces (though we could write one), but rather certain idioms which are exacerbating readability, flexibility, performance or any combination of the above.

Re:Something Secret This Way Comes by Manishearth on Sunday April 24, 2016 @07:57AM (#11559390)
The general term lint refers to things that catch possible bugs. http://github.com/manishearth/rust-clippy/ contains tons of lints which are much more powerful than just tabs vs spaces. Many catch code style things, but some of them also catch possible bugs.

The example I gave of "does not panic" isn't really a lint, more of a restriction -- a static analysis pass that helps catch things which might not usually be a problem, but are a problem for your specific use case (so off by default). But there are lints as well which could benefit from the nsa lint backend.

Re:Something Secret This Way Comes by melloc on Sunday April 24, 2016 @04:34PM (#11561253)
Things that complain about tabs vs spaces and other code layout concerns are style checkers. Linters complain about the actual content of the program, and enforce certain behavior. For example, warning you about unused functions, parameters, and variables, warning on duplicate fields in JavaScript objects, complaining about using parameter lists in C, etc.