Replies: 3 comments
-
Personally, I would love to see someone implement something cool based on Transaction Logic as an effects system. |
Beta Was this translation helpful? Give feedback.
-
The specific quote appears in the context of "integrating with C":
We can very easily integrate Scryer Prolog with imperative languages such as C, using for example the foreign function interface The terms "real world" appear in the post's title and in the following sentence:
Personally, I think this sentence is false. Counterexample: I use a lot of nondeterminism and constraints in Prolog programs, and as far as I can tell, the real world is neither recklessly duplicated, nor destroyed.
A corresponding Mercury uses additional arguments to represent the state of I/O: https://mercurylang.org/information/doc-latest/mercury_trans_guide/IO.html |
Beta Was this translation helpful? Give feedback.
-
Have you, @razetime, really tried Haskell's I/O? It is highly restrictive and "pollutes" programs. But, to be fair, it still permits a pure reading. What is so odd in the mentioned blog-post is that the required restrictions for pure functions are not seen as a disadvantage, but a restriction to determinism is seen as such a disadvantage. I think both are pretty much on the same level of annoyance. A similar I/O system for Prolog is thinkable, in fact Mercury has it. However, I guess that it would not be too popular. Haskell and Mercury can delegate most of the restrictions into the type system leaving a programmer only with the option to love it or leave. In Prolog the corresponding errors would only occur at runtime and thus people could be tempted to "work around it". Sometimes differences only show in the very fine print. Think of |
Beta Was this translation helpful? Give feedback.
-
I recently found an article from Vanessa McHale named Logic Programming Doesn't Work in the Real World, which tries to use Curry as an example for showing how nondeterminism does not lend itself well to working with I/O.
I found this conclusion odd:
What would the ideal way for a logic programming language to work with the real world "on its own terms"? I only know of the impure methods and using DCGs with stream-oriented I/O, but I am not experienced enough to come up with a retort to this statement.
Beta Was this translation helpful? Give feedback.
All reactions