davee123 said:
I used Prolog in college, too (I can't recall for what class). But when I went to the real world, poof! Gone. Did your friend wind up finding jobs (or landing any), that used Prolog? Or was his use limited to school? Just curious, since sometimes academia has a different skillset than the industry.
Well, as I said before:
If you end up doing anything that will reward with money rather than with publications in journals, probably not.
I sincerely doubt it, there are maybe some jobs out there. But in the end, prolog was designed as a research language, not a commercial language. But then again, so was Fortran and C was originally designed as a portable assembly in mind and we saw what came from those.
Edit: By the way, though he mostly programs in Java for his job, he does occasionally work in prolog, he works at a security firm and has actually convinced them to start using prolog for some things, apparently it went like 'This took several people a week do to in Java? I can do this in five hours in prolog.' - 'What is this "prolog" you speak of?' - 'Some language specifically designed for AI.' - 'You're on, I want to see this.'
I guess I kind of figure that SOMEONE out there is using Prolog, but I didn't think it was actually used in things like game AI for commercial products or anything. I can't imagine (for example) StarCraft 2's logic engine being programmed in Prolog.
Unlikely that prolog would be used for game bots in shoot'em ups or RTS, but a chess bot or a go bot would have its applications.
Prolog is ultimately best suited to code AI's that learn along the way.
But I COULD imagine things like research projects for chess programs being written in it. Or maybe applications for neural networks? Again, I don't really see neural networks applied anywhere in business (maybe I'm just not looking in the right places), but I DO see them mentioned in research projects and such.
Well, prolog could indeed have an application in market analysis I reckon, predicting the next step the market will take and all those things with a self-learning AI, prolog is suitable I guess.
Though, one thing I have to add is that I'm with Dijkstra on the fact that corporations make bad decisions regarding programming languages and technology in general, CEO's, usually don't know anything about programming and I am particularly unimpressed with the grave errors some CEO's can just make and still get a gigantic bonus. Dijkstra was ultimately right that what we're doing was and still is to some extend a time bomb. The code on which large corporations run is hacked together and isn't scalable at all. Declarative languages such as prolog or functional languages provide scalability.
But that's all tangent to how easy you're going to find a job with prolog, that they should do it doesn't mean they do it. In the end we have to accept that large corporations started wrongly decades ago and have now become dependent on badly coded software in the wrong language which a rewrite in a good language would be an investment, but an expensive one.
So my final verdict is simply to be summarized with:
A: prolog will
not land you a job in commercial ventures
B: prolog has its uses in academics
C: prolog will teach you a way to think that could be useful
For the record, I used Scheme for our AI class (not Prolog), and I have to say it was quite a different way of wrapping my head around problems than any language I had used prior (BASIC, C, C++, and Pascal at the time). I guess I don't remember much about what specifically makes it so much better for AI than other languages (or, so I've been told). Does it actually perform better?
Prolog's performance used to be extremely bad, but JIT compilation and some tricks have since made prolog reasonably on par performance wise with other similar dynamic and reflective language, it's not a number cruncher though.
Prolog isn't better for AI per se, prolog in the end is mainly for self-learning systems, for instance, the physics and facial expressions behind Final Fantasy, The Spirits Within were done in Scheme I believe, and Scheme is an excellent language for that. As soon as you start dealing with numbers instead of true/false, prolog isn't that good.
Or is it merely the way the language is constructed? At the time, I was rather unimpressed, and I recall always wishing I could write the assignments in C.
Well, most Scheme / prolog / Haskell whatever programmers will tell you 'if wish to use assignments, you're doing something wrong' and I second this. So to the OP, you've only mastered prolog once you never think 'Hmm, it would be nice to change the value of this variable here'. Don't try to replicate an imperative style in a declarative language, rather realize that a declarative paradigm is simply different.
And this is also one of the valuable skills that prolog will teach you, in prolog, you don't code while you think of the problem, in prolog and most declarative languages, you work in a top-down way. You first analyse exactly what your problem is, and then the code writes itself. This is why declarative programs are often very terse, but tend to require extensive planning before you can even begin. You have to ask yourself what the problem is precisely before you can solve it. Prolog thus teaches you to disassemble a problem into its essential components, which is a skill that could be useful outside of programming.
So if you have the time, give it a try, see if you like it, and if not, then by all means stop. Because it probably won't land you a job, though it might look good on your resume that you also know prolog, it shows you can adapt.
I mean, try to write a program that when given an arbitrary version of the liar paradox gives its solution space to you. You know, those riddles like 'Frank says that john always lies, Michelle never lies and says that at least one of frank and john lie ...', you do not want to do that in Java or C. You want to do that in prolog or maybe nondeterministic Scheme