Re: Backtracking in Icon Also sprach ruiter@ruls41.LeidenUniv.nl (Jan-Peter de Ruiter) (<3cv0bd$gdv@highway.leidenuniv.nl>):
+---------------
| G. David Kuhlman (dkuhlman@netcom.com) wrote:
| : But now, in spite of the fact that I have a language
| : with a strong backtracking mechanism, I find that I
| : don't use it much, except of course, for trivial
| 
| : constructs like:
| 
| :     (checkValid(x) | write("error"))
| 
| 	nlines :=  +argument[1] | 10  
| thereby establishing a default value for nlines that can be 
| overwritten by a commandline argument. This is a very natural
| formulation that I use very often in my Icon programs.
+------------->8

I think the problem with general use of backtracking is that, while
convenient, it's less efficient than improved algorithms are for any given
task.  (Compare recursive vs. nonrecursive algorithms as another example.)
Nevertheless, when it's needed (no readily available non-backtracking
algorithm available in a timely fashion) backtracking is very useful.

++Brandon
-- 
Brandon S. Allbery KF8NH	 [44.70.248.67]		bsa@kf8nh.wariat.org
Linux development:  iBCS2, JNOS, MH					 ~\\U
Controlling application developers is like herding cats. --Oracle DBA Manual

