Elektrine lite

← Feed

@chemoelectric@masto.ai

Post #1864452

2026-04-21 20:23 UTC

But the smart alec completely missed what I ACTUALLY would have done. That is, I would have broken the subroutine in natural, smaller pieces. I did this with the Pratt parser in my compiler, yesterday. I said to myself, ‘This is getting to be a mess of checks for errors. And there is no exception mechanism in C, it has no proper tail call, and I WILL NOT use goto.’ So I looked carefully and broke the Pratt parser into a natural set of subfunctions. It takes practice, but it is worth it.

Replies (1)

  • @chemoelectric@masto.ai 2026-04-21 20:25

    Having exceptions, proper tail calls, or gotos wouldn’t alone have solved the problem, anyway. There still would have had to have been some kind of modularization.

    Open ##1864453