How do you guys think about the opportunity cost of learning dead/dying/new/unpopular languages? Even with newer languages that are gaining popularity and are likely to be used in the future, I struggle to justify the time investment. I could be wrong but some of my concerns are: - my time is better spent getting deeper into some more popular language that I already know to some extent - unused skills deteriorate wit…
Why Learn Prolog in 2021?
41–50 of 171 posts
Re: Why Learn Prolog in 2021?
#42What I got out of the experience:
1. Intellectual confidence - it's not often that we get to learn not just a new way of doing something but a new paradigm. I am 38, and while I try to challenge myself in all areas of life, how often is something a true mind-bender? The fact that I was able to wrap my head around (some of) the Prolog way of doing things proves to me that I "still got it" and is good exercise for keeping it that way.
2. One specific thing about Prolog is heavy reliance on recursion. I probably "get" recursion better than an average CS grad but this took me to the next level - I will be able to apply it in other languages.
3. There's something about Prolog that makes programing feel like this: a ton of thinking up front, but once you do it, the implementation is bug-free (versus lots of fiddling around in other languages). I guess that's probably true of non-imperative languages in general, but it was a nice change of pace. I am not a full-time programmer anymore (product manager) so for me coding is mainly fun/intellectual and doing it in a way that removes the fiddling is great.
4. Prolog feels very retro, I can't really explain it but it doesn't try to be cool - it's the opposite of say the latest JS framework that is polished to the 9s. Prolog feels more like the cockpit of a fighter jet - sparse and powerful, but you have to know how to use the tools.
5. The community is cool. I found the IRC channel and folks were very generous with their time, though to be fair I asked questions like: "I implemented X like this, is that canonical?" vs "how do I do X?"
6. I am glad to have Prolog in my toolkit. I can imagine problems down the road where logic programming is the best tool and I know I can reach for it now.
Bonus: a few posters in this thread asked about the ROI of learning a retro language given that they could be learning something else. I think it's totally up to you, but looking back on the list above, almost none of the benefits I enjoyed are that I now know Prolog. So I guess you have to pick and chose your challenges, I wouldn't get the same value from learning Fortran77 and I wouldn't expect anyone else to either. Prolog is different enough from whatever else you're doing that it can grow you beyond learning some minute detail of React Hooks (which are great, btw!)
Re: Why Learn Prolog in 2021?
#43- Because the author likes it.
- Because it's different.
- Because very few other people like it.
Is this really an effective pitch to students who are looking for an efficient way to use their limited resources?
Re: Why Learn Prolog in 2021?
#44How do you guys think about the opportunity cost of learning dead/dying/new/unpopular languages? Even with newer languages that are gaining popularity and are likely to be used in the future, I struggle to justify the time investment. I could be wrong but some of my concerns are: - my time is better spent getting deeper into some more popular language that I already know to some extent - unused skills deteriorate wit…
Re: Why Learn Prolog in 2021?
#45SQL is a language that could have been a Prolog. In fact, querying in Prolog in general is absolutely beautiful.
Prolog is homoiconic like lisp; extending the language with new features is trivial as it requires no new syntax.
Re: Why Learn Prolog in 2021?
#46How do you guys think about the opportunity cost of learning dead/dying/new/unpopular languages? Even with newer languages that are gaining popularity and are likely to be used in the future, I struggle to justify the time investment. I could be wrong but some of my concerns are: - my time is better spent getting deeper into some more popular language that I already know to some extent - unused skills deteriorate wit…
Is it worth becoming an expert? No. Is it worth spending a day or a week playing with? Most definitely. I have a few niche things I've picked up like that. Learning a little bit of Lisp was similar, although I'd like to learn more of that some day.
Re: Why Learn Prolog in 2021?
#47How do you guys think about the opportunity cost of learning dead/dying/new/unpopular languages? Even with newer languages that are gaining popularity and are likely to be used in the future, I struggle to justify the time investment. I could be wrong but some of my concerns are: - my time is better spent getting deeper into some more popular language that I already know to some extent - unused skills deteriorate wit…
Re: Why Learn Prolog in 2021?
#48If I understand constraint propagation and backtracking, why not just use those concepts when it fits the problem rather than an entirely new language meant specifically for that narrow range of problems?
Re: Why Learn Prolog in 2021?
#49https://github.com/andychu/hatlog
For example, can someone add good error messages to this? It didn't really seem practical. I'm sure I am missing something, but there also seemed to be a lot of deficiencies.
In fact I think I learned the opposite lesson. I have to dig up the HN post, but I think the point was "Prolog is NOT logic". It's not programming and it's not math.
(Someone said the same thing about Project Euler and so forth, and I really liked that criticism. https://lobste.rs/s/bqnhbo/book_review_elements_programming )
Related thread but I think there was a pithy blog post too: https://news.ycombinator.com/item?id=18373401 (Prolog Under the Hood)
Yeah this is the quote and a bunch of the HN comments backed it up to a degree:
Although Prolog's original intent was to allow programmers to specify programs in a syntax close to logic, that is not how Prolog works. In fact, a conceptual understanding of logic is not that useful for understanding Prolog.
I have programmed in many languages, and I at least have a decent understanding of math. In fact I just wrote about the difference between programming and math with regards to parsing here:
http://www.oilshell.org/blog/2021/01/comments-parsing.html#w...
But I had a bad experience with Prolog. Even if you understand programming and math, you don't understand Prolog.
I'm not a fan of the computational complexity problem either; that makes it unsuitable for production use.
Re: Why Learn Prolog in 2021?
#50Earlier quoted context omitted.
I'm curious about this as well, though in a more general sense than just PLs. There are already so many modern/useful things I want to learn that it's hard to justify learning something because it's 'beautiful' or purely intellectually stimulating.
Personally, I probably would have quit entirely had I limited myself to only learning “practical” things.