~/bend-docscommunity

language/unneeded_plus.bend fails

raw source on the hub · import bend-lint-rules@0.1.0.0/language/unneeded_plus.bend as Unneeded_plus

language/unneeded_plus: a binder written with + that its body uses at most once on each path, so the + claims a reuse that never happens. Heuristics: it reads how often the checker found each binder used, the most over its branches. A binder that a match or a let takes apart is skipped: its + also makes its fields reusable. So is a parameter of a definition used as a value (OnFile{run}): the type it must have can ask for the +. The + costs no speed: the compiler counts references from the uses, not from the +. Removing 1,049 such + from Bend's slash boss demo, three-bodies and a raytracer left their C unchanged.

3 imports
import Base
import bend-lint-api@0.1.0.0/linter/lint.bend as Lint
import bend-lint-api@0.1.0.0/shared/lists.bend as Lists