The anecdote about the challenge of converting GOTO statements to functions and loops made me think of something I’m working on - refactoring a large amount of global Sass and CSS in an old Rails app. You can’t change one part without breaking other places, or even add new styles without countering the existing.
Maybe many problems that make large codebases hard to work with come down to (the lack of) local reasoning, whether that’s CSS styles, global data, etc.
I think that’s exactly right, and it matches my own experience with large, old CSS codebases as well. I am grateful that there are a bunch of things landing in CSS lately and in the years ahead which will help with that, because it is a real, and difficult problem. I think it is also the fruit of very reasonable design choices: the cascade is, at least in theory, designed to enable you to do minimal work in the smallest number of places… but in practice it often ends up having the opposite effect because of how organically design tends to evolve over time in an app or site.
Good point! The cascade means CSS is non-local by design, and probably made a lot of sense when the web was intended to be small documents with a little bit of styling.