230
True Story (lemmy.world)
you are viewing a single comment's thread
view the rest of the comments
[-] words_number@programming.dev 42 points 6 months ago

The stone-age called, they want their languages that need header files back!

(I use Rust btw.)

[-] Jabbermuggel@discuss.tchncs.de 2 points 5 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 5 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

32050 readers
1518 users here now

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

Rules:

founded 5 years ago
MODERATORS