230
True Story (lemmy.world)
you are viewing a single comment's thread
view the rest of the comments
[-] Jabbermuggel@discuss.tchncs.de 2 points 7 months ago

I know that header files have some pretty horrible issues with templates and cyclic dependencies and so on, but from an organisational perspective I really like them. If I have to implement some complicated algorithm I could easily have a thousand likes + of Code, but the header still quite nicely shows the general structure in one or two screens. Whenever I do classes in python I start wishing for headers at like 300 lines, simply because I loose track of all the functions I already made.

Maybe I'm just not a good python programmer tho.

[-] words_number@programming.dev 3 points 7 months ago

I'd say at 1000 lines it usually makes sense to extract some parts into other files. But sure, I guess most obscurities have positive aspects. On the other hand, nothing is stopping you from writing a separate file with only function signatures next to your python scripts. It's just not required, because why would it ;)

this post was submitted on 22 Mar 2024
230 points (94.2% liked)

Programmer Humor

32365 readers
564 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS