• frontporchtreat@lemmy.caB
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      10 months ago

      One of the benefits of the haskell style is easy commenting of the additional functions. I do something similar in my python scripts when testing several differnent chunks of code.

      But then again I chose a career in GIS so I probably have a mental disorder.

      • littletranspunk@lemmus.org
        link
        fedilink
        English
        arrow-up
        1
        ·
        10 months ago

        I might just do that style just to make my professor cringe on my next c# assignment

        “I mean, it’s right, it runs, but it looks like shit”

  • Cerise_W@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    10 months ago

    Can we talk about variable scope? Is x changing inside a called function without so much as a pointer being passed?

    • Deuces@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      10 months ago

      Avoiding global variables is just something dumb people do to protect themselves. Real programmers declare every variable before Main.