News for hackers. Stuff that matters.
Re:Modern Pascal is still in the race (2022) by trealira on Wednesday October 11, 2023 @05:48PM (#37850676)
In languages without this feature (most of them), you sometimes see long blocks get labeled at the end anyway. On then other hand, you could argue that if your block is long enough it doesn't fit on the screen, then it should be its own function anyway.

Like this, except replace "..." with many lines of code.

  if (z.p == z.p.p.left) {

      ...

  } else { // z.p != z.p.p.left

      ...

  } // if
Re:Modern Pascal is still in the race (2022) by dwheeler on Friday October 20, 2023 @10:05PM (#37963450)
> In languages without this feature (most of them), you sometimes see long blocks get labeled at the end anyway.

True. However, in Ada at least, if the block types don't match then it's a syntax error detected at compile time by the compiler. Comments like those listed above are often not checked at compile time, and thus aren't very useful for preventing errors.