I really recommand to have a look at the code.
I really recommand to have a look at the code.
https://source.netsurf-browser.org/libdom.git/tree/src/core/...
https://source.netsurf-browser.org/libdom.git/tree/src/core/...
https://source.netsurf-browser.org/libcss.git/tree/src/parse...
Looks like the authors have a severe case of goto-phobia that causes a quadratic explosion of copy-pasted code in the error-return paths. Some of the files also feel like they have been translated into C from C++ or some other OO language by some automated tool, resulting in some very long "namespaced"-looking identifiers.
Then again, I don't think Firefox or WebKit code is that much better either, so my impression of this codebase is neither great nor horrible. As "beautiful" is subjective, to give a reference for what I'd consider beautiful, look at BSD or early UNIX.
The third one is true goto-phobia of course. Crazy how people can't see the mess they make by avoiding goto for the sake of avoiding goto.
My comment may seem exagerated but that retranscribes very well how I felt when I discovered this code. Often, I'm overwhelmed by the code tree of medium to big-sized projects, with many abstractions and complicated folder structures. This is a browser and yet it was easy to figure out where to find the parts I was interested in and to understand what the code did.
Now, one can always find problems and discuss about the lack of gotos or arrays, but if as a complete outsider I can navigate and understand the code, and even feel that I could hack it quite easily with no documentation, something must be right with it.
I'm not in any way connected to the project, I don't even use this browser (sadly, it is too impractical).