I’m reading Guy Steele’s interview in Coders at Work, and I found one of his analogies to be pretty neat:
And if you look at the fairy tales, people want to be able to just think in their minds what they want, wave their hands, and it happens. And of course the fairy tales are full of cautionary tales where you forgot to cover the edge case and then something bad happens.
As a pretty accurate real world example, he offers:
…suppose I were to tell my smart computer, “OK, I’ve got this address book and I want the addresses to always be in sorted order,” and it responds by throwing away everything but the first entry. Now the address book is sorted. But that’s not what you wanted.
Yeah, that’s how programming feels. I remember running into situations exactly like that when programming in Epilog and when trying to annotate code to pass through a static analysis tool. Those problems made me think that the logical/declarative paradigm is just not cut out for being written by humans, whereas functional and certainly imperative models of computation are actually more intuitive, despite their complexity.
I’m not sure Steele would draw the same conclusion, but his list of more than a dozen languages he has worked in seriously does not include Prolog.