Haskell - First Impression [Programming Languages Episode 25]

Поділитися
Вставка
  • Опубліковано 29 вер 2024

КОМЕНТАРІ • 13

  • @Bobbias
    @Bobbias 3 місяці тому +2

    Around 18:00 you talk about how you can define the function for specific inputs.
    In my mind its a lot like defining explicit template specializations in c++ templates. Not from an operational point of view, but from a more syntactic or experiential view.

    • @MikeShah
      @MikeShah  3 місяці тому +1

      Nice way to think about it actually, at least since I think in C languages usually 🙂

    • @Bobbias
      @Bobbias 3 місяці тому +1

      @@MikeShah that's why I mentioned it. I learned c++ as my first language using a pre c++ 98 book as a kid, so while I've learned lots of languages since then, c/c++ style languages feel the most natural to me.

    • @MikeShah
      @MikeShah  3 місяці тому

      @@Bobbias We have had similar paths :)

  • @Bobbias
    @Bobbias 3 місяці тому +3

    My experience with Haskell was a combination of "why does the compiler hate me so much?" And "What the hell is a monad, how do I do anything useful in this damn language?".
    At least that meant I wasnt so surprised when I discovered the Rust compiler also hates me :)

    • @MikeShah
      @MikeShah  3 місяці тому +1

      😂My first experience with Haskell was similar years ago. Revisiting it today I can appreciate it a bit more. It would be fun to build a parser or some larger project in Haskell to otherwise really give it a go 🙂

    • @Bobbias
      @Bobbias 3 місяці тому +1

      @@MikeShah I've gone back a couple times, but never for very long. I find the terseness of Haskell code and the documentation dense and uninformative at a glance (as a beginner anyway).
      And the prevalent use of inscrutable jumbles of symbols instead of actual function names in various libraries can make it incredibly confusing to read code that actually uses libraries of any sort as a beginner.

    • @MikeShah
      @MikeShah  3 місяці тому

      @@Bobbias definitely takes practice, I found revisiting every few years I can get better, just takes time 🙂

    • @bobweiram6321
      @bobweiram6321 3 місяці тому

      @@MikeShahNo programming language deserves years of my attention without demonstrating it solves a problem better than the langauges I'm already using.

    • @0LoneTech
      @0LoneTech 3 місяці тому +1

      The Haskell compiler doesn't hate anyone. It's just pretty bad and mind reading, which is fair enough as everything else is too. Most of the time it tells you what things it can't get to fit together, and placing a few type annotations will help you isolate where there's a mistake.
      For me, Haskell's strengths are a handful:
      Firstly, it lets me write what I want done, rather than heaps of minutiae about how that relates to someone else's idea of how programs are structured.
      Secondly, it actually teaches me. I find concepts including mathematical terminology, like semigroups for reductions. This is way better than e.g. C++'s library committee renaming everything. It's map reduce, not transform accumulate.
      Thirdly, the library of structures, algorithms and bindings is pretty strong. It's not "batteries included" by default like Python, but it's very easy to look up (Hoogle rules) and add on.
      There are some weaknesses too. For instance, if you want to process much text you don't want to use String to do it; use Text. And memory usage can be non-trivial; tools like Conduit can assist. Nothing beats C for portability.

  • @bobweiram6321
    @bobweiram6321 3 місяці тому +1

    I always thought Haskell came from India because it has currying.