• @[email protected]
    link
    fedilink
    416 months ago

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

    (I use Rust btw.)

      • JoYo
        link
        fedilink
        English
        56 months ago

        Did they add modules to the standard yet?

    • @[email protected]
      link
      fedilink
      26 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.

      • @[email protected]
        link
        fedilink
        36 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 ;)