• Jabbermuggel@discuss.tchncs.de
    link
    fedilink
    arrow-up
    2
    ·
    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
      link
      fedilink
      arrow-up
      3
      ·
      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 ;)