4 ms·
If you want to write a compiler it's faster to learn Prolog then write a compiler in Prolog than to write it in some other [imperative] language you already kno
by carapace 4y ago
If you want to write a compiler it's faster to learn Prolog then write a compiler in Prolog than to write it in some other [imperative] language you already know.
(Prolog is so much more "compiler-shaped" than imperative languages and so simple itself that it's much easier to use it to write compilers. In fact the last chapter of "Art of Prolog" is about writing compilers.)
- pjc50 4y agoNo. (This is a joke about prolog error handling)
- carapace 4y agoHa! Classic.
- downvotetruth 4y agoSource?
- carapace 4y agoIt's an old Prolog joke. Early Prologs (and many still today) would reply "no" to queries that have no results. (In practice the issue can be overcome by making a meta-interpreter that does tracing or error reporting or whatever. It's standard Prolog idiom, "in the book". See also: https://www.metalevel.at/prolog/debugging https://www.metalevel.at/prolog/debugging )