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!

  • 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