News for hackers. Stuff that matters.
Re:Better C – A subset of D Programming Language by hibbelig on Tuesday April 28, 2020 @12:11PM (#23008445)
I prefer to put "var" into the loop header because the combination of two types is hard to read. It's easier to read (for me!) when the type of the key and the type of the value are separated, like they are on the first two lines of the loop body.

    for (var x : someMap) {
        final SomeLongType key = x.getKey();
        final AnotherLongType value = x.getValue();
        ...
    }

There are no comments on this comment yet.