5 ms·
You can answer this question yourself: simply figure out how you'd implement certain types of programs in Prolog. For example: an operating system, a Unix comm
by gpcz 9y ago
You can answer this question yourself: simply figure out how you'd implement certain types of programs in Prolog. For example: an operating system, a Unix command-line tool, a video game, etc. You'll quickly shake out deficiencies.
- zmonx 9y agoThese are good questions! As a simple control, I have asked myself these questions with Java in mind, which enjoys notable popularity. Would I write an operating system in Java? No. A Unix command-line too? No. A video game? Probably not. In my view, this casts some doubt on the test's adequacy to answer the initial question. In the concrete case of Java, I think marketing and other influences also played important roles. It could be possible to apply these advantages to Prolog too.
- jorams 9y agoYou are not asking the same questions. The question is how would, not would. While I'll admit writing an operating system in Java is non-trivial (thinking of kernel-level programming here), writing a command-line tool or a video game is pretty simple. You main method receives command line arguments, so that part is covered, and for games you do pretty much what you would do in any other language.
- zmonx 9y agoThank you! Indeed, the question was "how" would I do it, so let us consider it: Operating system in Prolog: Non-trivial, i.e., like in Java. Command-line tool: Pretty simple: My main predicate receives command line arguments. There are countless such examples already, included in the SWI-Prolog distribution (for example). And, as you say, for games I would do pretty much the same as in any language also in Prolog. In my view, this still leaves the same doubt about these questions: Can we distinguish Java from Prolog in any way by answering them?
- tom_mellior 9y agoWhat's wrong with writing Unix command-line tools in Prolog? I'm asking because the "deficiencies" aren't clear to me, although I have written command-line tools in Prolog.