Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah line count is a hard metric to evaluate. Is your code 100 lines of code like this:

    let foo = Foo::new()
        .with_bar()
        .with_baz(bak, bat)
        .listen();
Or code like this:

    for f in in foo.iter() {
        if f == 1 || f > 9 || f % 2 == 0 || is_edge_case(f) {
            ret.push((f * 100).to_string());
        }
    }
Makes a big difference for readability. If you have a complicated conditional, go ahead and give it a name!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: