
Why prolog is by far the best, most productive, easiest programming language - narke
http://eliminatingwork.blogspot.com/2010/02/why-prolog-is-by-far-best-most.html
======
p4bl0
Why is this getting upvotes? Are some people voting before actually reading
the content? The formatting of the text and the content are very poor and the
points are not justified at all.

"Prolog is cool because you can write stuff is a spreadsheet, then export it
to CSV and then use some regexp to convert that to actual prolog code."
Seriously? Who would do that?

"Forget data structures and algorithms you don't need that." This paragraph
starts with "You don't need to know recursion". Prolog. No need to know
recursion. Prolog. Okay dude, sure.

Last but not least, I don't think someone saying that Prolog code is naturaly
concise and elegant _because it's like writing SQL queries_ knows what he's
talking about at all.

~~~
_delirium
Yeah, this is a very... strange article. I like Prolog, but not because it's
"almost exactly the same as relational database sql" with better syntax.

------
tom_b
I think what Prolog, SQL, Lisp, or even J really offer is cheap exploratory
development.

I am tremendously productive sitting in front of a REPL with access to data.
Even with my Ruby hacking, I tend to be playing with 1 to 4 lines of code in
irb while building my scripts and tools.

I have not had the opportunity to build a big production system with any of
these languages though. I wonder if some of the reason the OO enterprise
languages work and hang on is that they facilitate understanding and
communication between developers.

I hate the amount of boilerplate code that seems to wrap around code examples
I see in Java and C# sometimes. I was looking at a tutorial just yesterday
that boiled down to declare an array of values, use a matrix of these other
values, and apply these functions to the matrix until convergence occurs.

The amount of jumping I was doing between different Java class files and
static functions was completely an impediment to the point of the tutorial,
which was to demonstrate the logic of the process. OTOH, I was able to jump
around and follow the points. But I really think it could have been more aptly
demonstrated in a few lines of code in another language.

Thinking of this interview with Arthur Whitney and this topic:

"BC To ask a slightly broader question, what is the con- nection between
computer language and thought? To what degree does our choice of how we
express software change the way we think about the problem?

AW I think it does a lot. That was the point of Ken Iverson’s Turing Award
paper, “Notation as a Tool of Thought.” I did pure mathematics in school, but
later I was a teaching assistant for a graduate course in computer algorithms.
I could see that the professor was getting killed by the notation. He was
trying to express the idea of different kinds of matrix inner products, saying
if you have a directed graph and you’re looking at connections, then you write
this triple nested loop in Fortran or Algol. It took him an hour to express
it. What he really wanted to show was that for a connected graph it was an or-
dot- and. If it’s a graph of pipe capacities, then maybe it’s a plus-dot-min.
If he’d had APL or K as a notation, he could have covered that in a few
seconds or maybe a minute, but because of the notation he couldn’t do it."

<http://mags.acm.org/queue/20090203?pg=12#pg16>

------
gatlin
I can't fathom how a networking stack or GUI framework would be written _in_
Prolog itself (assuming some basic primitive access to the machine were
available to the interpreter). Everything besides logical inference and
deduction would have to be written as foreign bindings. Whichever
implementation of Prolog I've used had basic arithmetic in it.

This begs the question: why not go the other way and use Prolog as an embedded
DSL in another language? Racklog and Datalog[1] demonstrate this is possible
and rather useful. Then you have the benefits of Prolog inside another
language which can do ... stuff.

And if I ever succeed, perhaps you could have Answer Set Prolog embedded in
your code too and solve NP-complete search problems declaratively. But this
isn't a plug.

[1]: <http://docs.racket-lang.org/racklog/>

------
kennu
That seemed to be mostly a rant about what you _don't_ do with Prolog, not
about what you actually can do. The example of exporting a spreadsheet to CSV
doesn't sound too convincing of the language's miraculous powers.

------
islon
"Why prolog is by far the best, most productive, easiest programming
language?" Because you want to believe it. You can change 'prolog' to any
other language and easily find people agreeing with you.

------
ronreiter
seriously?

------
hastur
Flame bait? ;)

