4 ms·
And is such a long file GitHub can’t even display it. I get collocation but is one file that’s so large it has editor problems as a result, really such a good t
by lloydatkinson 2y ago
And is such a long file GitHub can’t even display it. I get collocation but is one file that’s so large it has editor problems as a result, really such a good thing?
- chii 2y agoThat says more about the browser and github than the language. Nothing wrong with a large file. The editor should be able to help you navigate and see the file without the size being a concern at all.
- johnnyanmac 2y ago>The editor should be able to help you navigate and see the file without the size being a concern at all. Jetbrains's suite has a very large but reasonable limit (500k lines IIRC) before it simply disables it code analysis/highlighting. You can increase it if you need to, but I imagine they keep that number by default for perfomance reasons.
- mattpallissard 2y agoAgreed, I love the one large file approach. :split :vsplit That said, I never use it because everyone else complains about it.
- vundercind 2y agoSame, I increasingly dislike splitting up code into separate files unless there’s a really good chance each file’s going to be imported/used independently in at least some cases. I realized I’d made this shift a couple years ago when I had a ~500 line (god, that’s not even that long) single-file program I was very happy with and thought well-organized and someone a fair bit more junior complained that it needed to be split up just because it was long. Ew. No. Thought a decade or more ago I might have thought the same thing.
- zadokshi 2y agoIt’s really an editor problem. Theoretically there could be a world where all code is in one file, and that’s ok because the editor allows you to effortlessly navigate your code via a variety of means. For some this might be using a keyboard, for others more visually inclined, perhaps in Java there is a browsable visual model. I’m honestly surprised there doesn’t have exist an editor/language that abstracts away the concept of source code files completely. I assume that there is a good chance that in 50 years time we won’t be coding using collections of text files.
- mike_hearn 2y agoThere are a few: - https://www.jetbrains.com/mps/ https://www.jetbrains.com/mps/ - https://squeak.org/ https://squeak.org/