Glyphin » Forums » Single file programming
Telash
Mikael Johansson
46 posts
1 project
#12274 Single file programming
3 months ago

I write all my stuff in C, and a few weeks ago I started to feel that GCC was getting a bit to slow to compile. I threw all my c-files and headers into one single file. Suddenly the compiletime became super fast (not TCC fast, but still), and even the binary became about 20% smaller. And so far its just as easy, if not even easier to work in it. It made me thinking, we split projects into files, in order to make it maintainable. So why not try to design Glyphin in a way to make it easy to maintain single file-projects.
alyssa_fae_0
Alyssa Fae
2 posts
#12292 Single file programming
3 months ago

As someone that loves the simplicity of using a single file for a whole project, that's an extremely intriguing idea. Do you have any ideas for what features in particular would be helpful for that scenario?
Telash
Mikael Johansson
46 posts
1 project
#12293 Single file programming
3 months ago Edited by Mikael Johansson on June 27, 2017, 3:43 p.m. Reason: fixed spelling

I have not yet had the time to give this any focus, but I will definitely give this idea a lot of love :)
First thing is to let the program "pretend" there is files. Like have a scope (for example a function or a class) open like its own file, and only that scope is seen in the window, while all changes actually happens in the real file.

Also, code folding is a given.