3 ms·
Why not have each of those sections as a separate file?
by steve_musk 8y ago
Why not have each of those sections as a separate file?
- rocqua 8y agoIt's a balancing act of-course. The total file is ~200 lines at the moment, breaking it up would create some very small files, and generate a lot of 'including' boilerplate. Moreover, it would make it more difficult to understand the whole thing. The lexer and parser are closely coupled (by the data type for the tokens) and the parser and 'processor' are closely coupled by the data type of the syntax tree. I could still see it happen that it does get split, and there are certainly coding styles that would have split this without question.
- iofiiiiiiiii 8y agoThat works if you need to usually only work within a section. However, in many cases switching files can be more distracting than scrolling to a different section in the same file.
- Cursuviam 8y agoSections are the step before separate files for me.