In this episode, Matti and Wouter are joined by John Hughes. John is one of the authors of the original Haskell Report and talks about why functional programming matters, the origins of QuickCheck testing, and how higher order functions and lazy evaluation is the key that makes functional programming so productive, and so much fun!

  • Boyd Stephen Smith Jr.@hachyderm.io
    link
    fedilink
    arrow-up
    1
    ·
    11 months ago

    @jaror Haskell 2010 is pretty simple. What do you imagine is the simpler starting point, if any? If Haskell 2010 is a good starting point, aren’t language pragmas / extensions effectively the same as your “language levels”?

    • jaror@kbin.socialOP
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      11 months ago

      Type classes are a big cause of confusion among newcomers, and even parametric polymorphism.

      If you want to see how simple a language can really get you should check out Hedy: https://www.hedycode.com/. It even removes string quotes (let alone variables) at the simplest level. Although it is too imperative for my taste.

      • l'empathie mécanique@qoto.org
        link
        fedilink
        arrow-up
        0
        ·
        11 months ago

        @jaror @BoydStephenSmithJr Type classes have been in Haskell since forever. There’s no Haskell “level” that would avoid them while being a level of Haskell instead of some vague/generic “functional programming”.
        If you want to teach Haskell - you teach Haskell, with its staples like type classes and laziness.

        • jaror@kbin.socialOP
          link
          fedilink
          arrow-up
          1
          ·
          11 months ago

          I’m not suggesting you should never explain type classes. I simply want to avoid having to explain type classes before I can explain how to add two integers. And more importantly, I don’t want error messages to mention type classes until they have been understood.

          • Boyd Stephen Smith Jr.@hachyderm.io
            link
            fedilink
            arrow-up
            1
            ·
            11 months ago

            @jaror @dpwiz@qoto.org I think without the type of polymorphism that Haskell uses type classes for, the language can never be more than a toy.

            But, that doesn’t mean it can’t be didactically useful. A “Haskell–” with a JS-style Number for all numeric literals and replacing all numeric type classes with top-level operators on that type could be useful, for a bit.

            Once you want to do indexing (e.g. Array) you need to distinguish between numbers like sqrt 5 and suitable indexes, tho. Enter polymorphism