News for hackers. Stuff that matters.
Re:I want off Mr. Golang’s Wild Ride (2020) by preseinger on Friday April 29, 2022 @09:55PM (#31212667)
Cognitive load is unrelated to SLoC.

This expression

    let a = x.iter().filter(...).apply(...).map(...);
is equally or even potentially _more_ cognitively complex than this expression

    for _, v := range x {
        if !filter(v) {
            continue
        }

        vv := apply(v, ...)
        vm := map(vv, ...)
        ...
    }
Re:I want off Mr. Golang’s Wild Ride (2020) by lamontcg on Saturday April 30, 2022 @12:34AM (#31213362)
focusing on a pedantic detail that i clearly didn't intend and which doesn't change my point.

consider it from a blocks-of-code metric, or some better slightly more abstract metric, that isn't affect by simple things like whitespace transformations, and try assuming that we all understand that we should write code that isn't monstrous to begin with.

Re:I want off Mr. Golang’s Wild Ride (2020) by preseinger on Saturday April 30, 2022 @10:29PM (#31221590)
"Monstrous" is an opinion, not a metric.

I would personally much rather maintain the code in the second example than in the first.