Hacker News new | past | comments | ask | show | jobs | submit login

Does logic programming really count as flow control? To me, it's an entirely different paradigm, where there is no real flow at all; all statements operate simultaneously.



Prolog might be a "logic programming" language, but the flow control is explicitly based on backtracking. Each possible solution for each statement is iterated, one at a time, and the results are fed into the next statements. The program is basically run as a search through the constraints in depth-first order. http://www.doc.gold.ac.uk/~mas02gw/prolog_tutorial/prologpag...


They don't operate simultaneously. Order is not defined in some constructs, but it's still there and can also be forced.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: