braintax 0.1.0

A minimal cognitive tax estimator — quantify how mentally taxing code patterns are.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use braintax::Braintax;

fn main() {
    let score = Braintax::new().with_nesting(3).with_branches(5).compute();

    println!("Cognitive tax score: {score}");

    let baseline = Braintax::new().compute();
    println!("Baseline (no complexity): {baseline}");

    let deeply_nested = Braintax::new().with_nesting(6).with_branches(12).compute();
    println!("Deeply nested code:      {deeply_nested}");
}