News for hackers. Stuff that matters.
Re:The 80/24 Rule by Gibbon1 on Friday November 15, 2019 @05:34AM (#21543794)

   DoA();
Is an API like thing.

   // A
   ...
Is not an API like thing.

API's are hard to get right. API's create dependencies. Most internal API's are hot garbage.

Re:The 80/24 Rule by tasogare on Friday November 15, 2019 @07:04AM (#21544167)
It's not an API if the methods are private or declared inside the method. I just rewrote a portion of code the other day with the discussed pattern because it made the high level step very clear:

  DoAll() {
    DoA();
    DoB();

    DoA() { ... }
    DoB() { ... }
  }
Re:The 80/24 Rule by ufo on Friday November 15, 2019 @08:56AM (#21544770)
One thing I like about the "straight code" version is that it is clear that things are executed sequentially, and only one time. With named functions it is possible that they could call each other too.