←back to thread

Learn Prolog Now

(lpn.swi-prolog.org)
205 points rramadass | 5 comments | | HN request time: 0.001s | source
Show context
jackallis ◴[] No.45901786[source]
is prolog a use-case language or is it as versatile as python?
replies(4): >>45901913 #>>45901945 #>>45902960 #>>45902978 #
1. qsort ◴[] No.45901945[source]
Python wins out in the versatility conversation because of its ecosystem, I'm still kinda convinced that the language itself is mid.

Prolog has many implementations and you don't have the same wealth of libraries, but yes, it's Turing complete and not of the "Turing tarpit" variety, you could reasonably write entire applications in SWI-Prolog.

replies(1): >>45902068 #
2. WillAdams ◴[] No.45902068[source]
Right, Python is usually the second-best choice for a language for any problem --- arguably the one thing it is best at is learning to program (in Python) --- it wins based on ease-of-learning/familiarity/widespread usage/library availability.
replies(3): >>45902474 #>>45902667 #>>45902769 #
3. aeonik ◴[] No.45902474[source]
More like 3rd to 5th best is most categories. There's just a lot of categories.

Its ease of use and deployment give it a lot more staying power.

The syntax is also pretty nice.

4. ecshafer ◴[] No.45902667[source]
I don't know if I would say its second-best. It just happened to get really popular because it has relatively easy syntax, and Numpy is a really great library making all of those scientific packages that people were using Fortran and C++ for before available in an easier language. This boosted the language, right when data science became a thing, right when dynamic programming became popular, right when there was a boost in Learn 2 Code forget about learning fundamentals was a thing. Its an okay language I guess, but I really think it was lucky that Numpy exists and Numby or Numphp.
5. ux266478 ◴[] No.45902769[source]
Personally I find Python more towards the bottom of the list with me, despite being the language I learned on. Especially if the code involved is "pythonic". Just doesn't jive with my neurochemistry. All the problems of C++ with much greater ambiguity, and I've never really been impressed with the library ecosystem. Yeah there's a lot, but just like with node it's just a mountain of unusably bad crap.

I think lua is the much better language for a wide variety of reasons (Most of the good Python libraries are just wrappers around C libraries, which is necessary because Python's FFI is really substandard), but I wouldn't reach for python or lua if I'm expecting to write more than 1000 lines of code. They both scale horribly.