5 ms·
I’ve been curious about this topic for a while primarily because I’ve found that issues with circular dependencies/imports in my projects are simply a consequen
by ccorcos 4y ago
I’ve been curious about this topic for a while primarily because I’ve found that issues with circular dependencies/imports in my projects are simply a consequence of their organization into files.
If every exported variable or function was in a separate file, that would eliminate most of my problems. But it’s just a pain to write code that way…
- vaughan 4y ago> if every exported variable or function was in a separate file...But it’s just a pain to write code that way… I wonder if something that automatically organises your code into separate files would help...and fixes all the imports for you. A cli tool that would _lint/autofix_ your code organization. And then you would just need: - IDE plugin (VSCode, IntelliJ) to show an organized IDE file tree - cli tool to allow browsing organized code from terminal - perhaps a custom fs for viewing your project in Finder/terminal and easily browsing in other tools - git wrapper to show correct file names in diff/status - chrome extension for Github to show flat files in a structured way
- ccorcos 4y agoThat would be close, but you’ll end up with more annoyances if you remain focused on the FileSystem. - auto-generated file names are gross. - 50+ imports in each file with bogus file names is gross The FileSystem itself is a gross way to organize code after all. I may want to organize my code in multiple different overlapping views. I may want to organize by behavior (state, actions, etc) or by feature (login, comment, etc). My suggestion is an IDE that hides files from the user entirely. Something a little more akin to SmallTalk.