News for hackers. Stuff that matters.
Re:Learn Prolog Now by collyw on Monday March 23, 2015 @07:15AM (#9250300)
"Usually do this, but then other times do this, unless this other thing is true. If there's a parse error, then do xyz and keep going."

This is almost exactly like the descriptions I get from my team leader for getting results out of a database. He doesn't think in sets for SQL.

Re:Learn Prolog Now by lucaswiman on Wednesday March 25, 2015 @12:37AM (#9261316)
Right. I think this is how a lot of business requirements are specified, since they are frequently constructed by non-programmers. Taking a bunch of cases from a spec document generated by a domain expert and turning them into maintainable/readable procedural code takes a lot of creativity. I think it's easier to express case analysis like this in Prolog.