Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^5: (why to use logic programming)

by dimar (Curate)
on Feb 14, 2005 at 17:23 UTC ( [id://430865]=note: print w/replies, xml ) Need Help??


in reply to Re^4: (why to use logic programming)
in thread Easy Text Adventures in Perl

The comparison to RegEx programming turned on a light bulb. Does that mean that (continuing the analogy) Prolog internals are as scary and byzantine (compared to its straightforward representation in code) as RegEx internals are to the straightforward (after you get the hang of them) representation of m// and its relatives?

  • comparing logic programming to RegEx programming; (nice analogy and starting point for discussion) (++)
  • straightforward description in the update (++)
  • giving Larry Wall credit for TimToadys posts (??)

Replies are listed 'Best First'.
Re^6: (why to use logic programming)
by Ovid (Cardinal) on Feb 14, 2005 at 17:36 UTC

    The internals of AI::Prolog might scare a few people, but generally, no, Prolog internals don't have to be as scary. The main issue (I think) with Perl's regex engine is that it is so powerful that people always thought it should do just a little bit more. So they made it do it. With hacks. Lots of 'em. For example, being able to embed code in regular expressions is natural because people really wanted to turn regular expressions into its own programming language. When you consider that we have perfectly good logic programming languages already out there ...

    Of course, if you mean how Prolog works "under the hood" without worrying too much about the actual implementation (i.e., what's the sequence of steps it takes to arrive at an answer), then I would say Prolog's internals are ridiculously straightforward.

    And gosh, why would I give Larry credit for posts as brilliant as TimToady's? ;)

    Cheers,
    Ovid

    New address of my CGI Course.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://430865]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-03-28 12:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found