by Decabytes on 11/1/24, 8:51 PM with 3 comments
One of the primary benefits I've found is easier code portability. With all the code in a single file, you can simply drop the file into your project without worrying about dependencies or file organization. Refactoring also becomes more straightforward since you can see all the related code in one place, making it easier to update dependencies and related functions. Additionally, LLM assistants often perform better with code completion when all the code is in one file, as they can access the entire context more easily.
I've noticed that other projects also take a single file approach. For instance, SQLite concatenates all its C files when it's built, there are single file header projects like STB^1 that tout ease of use, and even the .NET garbage collector^2 is a single 56k file. So, this approach is not entirely unprecedented. With modern editing tools, this method seems more viable than ever before. What does everyone think?
1. https://github.com/nothings/stb 2. https://github.com/dotnet/runtime/blob/main/src/coreclr/gc/gc.cpp
by frnkng on 11/2/24, 6:25 AM
At some point in time, some dev splits the file to get faster responses again.
Despite this, we have no issues, git works fine and search and navigation in the code is also just fine.
by solardev on 11/1/24, 10:22 PM