Hacker News new | ask | show | jobs
by david-given 3583 days ago
There's actually sense to the magic words. Each word which opens a block has a unique word which ends the block. So, begin..end, if..end if, loop..end loop, etc.

The advantage of this is that it's much harder to screw up block terminations --- one thing I've done many times in C is when closing a chain of blocks with:

            }
          }
        }
        do_something();
      }
    }
is to miscount the braces and put do_something() in the wrong place. In Ada, that'd be:

            end if;
          end;
        end case;
        do_something();
      end loop;
    end;
...which is far more meaningful.
2 comments

That sounds like the cyclomatic complexity is too high.
You should read about how to write clean code... (instead of switching to another programming language)