3 ms·
Why Logtalk?
- infradig 4y agoLogtalk is an impressive piece of work. Development of Trealla Prolog would not have gotten to where it is without the impetus to support Logtalk and the feedback from Paulo.
- kamaal 4y agoStuff like this is always fascinating to me since I read 'The Reasoned Schemer' and worked my way through Clojure core.logic. So as I understand this leverages and extends Prolog, and yet it is very dry on showing your average programmer how they could use this to solve their real world every day problems. If such a segment of user being the intended audience here at all? Either way resources to learn something like this to do something useful are welcome. Can somebody who is more familiar with the ecosystem give some pointers?
- rad_gruchalski 4y agoOne reason could be having oop-style objects available in Prolog. Prolog modules are global, they’re like a singleton, or like s bunch of namespaced functions. Once you import a module, it is like a singleton. Prolog doesn’t have anything what could store a state of a module so functions inside of a module can operate on some common state. One way would be to use a global database but that’s really discouraged because of performance impact it can have. Modules being a Prolog construct can be basically created at runtime. So if you need multiple instances, you could create and load multiple modules at runtime. But that’s pretty verbose and quite a bit of work. Logtalk gives you this out of the box using your standard Prolog.
- harperlee 4y agoI think one of the use cases for lambda-prolog (a prolog for higher-level logic instead of first-level logic) was the ability to implement modules in a logical-native way.
- mangecoeur 4y agowhy indeed
- dsabanin 4y agoAs someone who've tried to use Logtalk for real project, my impression is that it's extremely verbose and feels like an attempt to create C++ or Mozart/Oz on top of Prolog. Unfortunately, I believe that doing this without introducing extra syntax, you end up with a lot of boilerplate in a language like Prolog without any decent tooling to help you handle it.