News for hackers. Stuff that matters.
Re:Push ifs up and fors down by valand on Thursday November 16, 2023 @04:18AM (#38287305)
Not even strictly DOD, this trivial principle produces better semantics and drives better code separation down the line.

Several years ago I was exposed to DOD (and then this principle) when working on complex JS/TS-based for long-running systems. It results in better code navigability, accurate semantic synthesis, and easier subsequent refactors.

The side effect: some people remarked that the code looked like C

Re:Push ifs up and fors down by gnuvince on Thursday November 16, 2023 @07:09AM (#38288559)
> The side effect: some people remarked that the code looked like C

Did you understand this comment to be positive or negative?

Re:Push ifs up and fors down by valand on Friday November 17, 2023 @05:05AM (#38301553)
It's neutral. However, a brief negative implication: it's less "idiomatic", as in the pattern that's commonly advertised as best practices