Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: Newbie, The secret with Prolog: How to to transform old
Bart Demoen wrote:
>
> Christopher Browne wrote:
> 
>
> Example(s) please :-)
> And just not to waste time, tell us also what you meant by "natural".
> Maybe that will explain more than the examples.
>
> Cheers
>
> Bart Demoen


The focus seems to be on recursion but actually the unification, pattern
matching, and dynamic structures of
Prolog are as much of a part of Prolog as recursion is. Also in addition
to Prolog's declarative interpretation
Prolog has an  procedural interpretation.


Prolog can express many things in a procedural way.  I can't figure out
why we often  want to equate procedural
programming  with (while/for loops).  As if procedural programming does
not involve recursion or backtracking.
Languages such as C++/C/Pascal etc have no problem implementing
recursion  and all the graph and tree programming
I've ever done in any of those languages used a lot of  DFS, BFS etc.


How repetition is accomplished is only a part of the issue.  The real
question is how are problems and solutions
modelled in a language.  Whether some problems are best represented
using the ideas of recursion/induction.  Also
whether some solutions are best describe using the ideas of
recursion/induction.


And what of hybrid problems/solutions where the processing is iterative
(while/for loop) and the
data structures involved are recursive in nature or  where the data
structure is linear and non recursive
but the processing requires recursion or induction. What's natural in
this case?


The procedural(misnomer) vs recursive is really only meaningful in the
most academic considerations. Problems and
solutions beyond the trivial tend to have multiple paradigms present.
C/C++ can implement recursive algorithms
and Prolog can implement sequential sequence.

Eventually we'll realize that the holy grail will require multiple
languages and multiple paradigms. And that
what we should be working on is standard ways to integrate the
languages.  Prolog from Fortran, Fortran from C++
C++ from Prolog etc.  As opposed to getting bogged down on the Algebra
vs Trigonometry debate.

Cameron
------------ And now a word from our sponsor ------------------
For a quality usenet news server, try DNEWS, easy to install,
fast, efficient and reliable. For home servers or carrier class
installations with millions of users it will allow you to grow!
----  See http://netwinsite.com/sponsor/sponsor_dnews.htm  ----

Report this thread to moderator Post Follow-up to this message
Old Post
Cameron Hughes
03-27-04 05:11 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Prolog archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 03:37 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.