3 ms·
That's a peculiar opinion. Usually, whenever discussion comes to parsing and codecs, people like to mention how the problem P could be solved with a purely func
by ainar-g 8y ago
That's a peculiar opinion. Usually, whenever discussion comes to parsing and codecs, people like to mention how the problem P could be solved with a purely functional language L so much more elegantly. And yes, logic and purely functional languages are not the same, but they seem to be very close relatives.
- tluyben2 8y agoI mentioned to my Haskell teacher in uni that I did 2 years of intensive Prolog for an AI course at another uni and so that I grasp the basics or ‘everything recursion’ (mind you, this is 25 years or so ago). He got angry and said the two have nothing in common and if I believe that I definitely should pay more attention. It was weird as I did not say they are alike; just that they share some concepts which are usually hard to understand for imperative programmers, but, after 2 years of breathing Prolog really are second nature.
- ainar-g 8y agoHonestly, that speaks more about the teacher's personal issues than it does about the similarities between logic and purely functional programming. I'm sorry that you had to experience that.
- garmaine 8y agoSibling comment is spot on. Your "teacher" was either not well informed or dealing with some issues himself. To cathartically let go of that experience, I suggest reading up on Curry, the logical language extension to Haskell: https://en.wikipedia.org/wiki/Curry_(programming_language) https://en.wikipedia.org/wiki/Curry_(programming_language)
- bjz_ 8y agoWaaaaaat. There's so much in Haskell's type system that is also in logic programming. Like Hindley-Milner type inference and type class instance resolution.