• alyth@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    9 months ago

    What is Lisp style, Lisp doesn’t have this syntax? Or is it referring to something other than Lisp languages. Same with Haskell.

    • stackPeek@lemmy.worldOP
      link
      fedilink
      arrow-up
      1
      ·
      9 months ago

      Haven’t coded with Lisp, but I’ve seen Lisp codes that are formatted like that. Haskell too.

      • littletranspunk@lemmus.org
        link
        fedilink
        English
        arrow-up
        1
        ·
        9 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”

    • frontporchtreat@lemmy.ca
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      9 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.

  • Cerise_W@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    9 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
      ·
      9 months ago

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