In this portion of our guide to programming languages and Prolog, we will focus on Logtalk, an object-oriented, logic-programming language that builds upon Prolog with features suitable for programming in the large.
In software development, programming in the large can involve programming by larger groups of people or by smaller groups over a longer period of time.
Designed by Paulo Moura, Logtalk first appeared in 1998, and it continues to be maintained and developed by the Logtalk community. As of this writing, the last stable release was on May 30, 2023.
The greatest influence over Logtalk, of course, was Prolog, from which it inherits its logic programming foundation. However, Logtalk was also influenced by Smalltalk, Objective-C, Java, and C++.
Logtalk is designed to extend and leverage Prolog with a strong emphasis on portability. It provides modern code encapsulation and code reuse mechanisms while enhancing predicate semantics. Implemented as a trans-compiler, Logtalk can use most modern and standards-compliant Prolog implementations as a backend compiler.
Logtalk is distinguished by its multi-paradigm nature. It supports modules for organizing code into separate units, prototypes for defining reusable templates, classes to enable object-oriented programming, protocols (interfaces) to define common behavior, categories (components and hot patching) to enhance code reuse, event-driven programming for handling asynchronous events, and high-level multi-threading programming to facilitate concurrent execution.
Code encapsulation, code reuse, and improved predicate semantics were among the design goals of Logtalk.
It emphasizes encapsulation, allowing developers to hide implementation details and expose only the necessary interfaces. The language provides mechanisms for reusing code across different contexts, and it refines Prolog's predicate semantics, improving intuitiveness and predictability.
Modularity, object-oriented features, and portability are among Logtalk's greatest strengths. Its module system promotes the clean separation of concerns, and its use of classes, protocols, and categories enhances code organization and reuse, while its trans-compiler allows Logtalk to run on various Prolog platforms.
Its weaknesses include a niche community, given its smaller user base, and the learning curve that might confront developers familiar with Prolog, particularly given its object-oriented paradigm.
Logtalk is well-suited for large-scale software development and metaprogramming, while its logic programming capabilities make it useful for representing complex knowledge domains.
While its community is small, as compared to mainstream programming languages, Logtalk is regularly maintained, with regular updates and improvements. Its community contributes libraries, tools, and documentation to enrich the Logtalk ecosystem.
Smalltalk is available through the Artistic License and the Apache License.
Logtalk bridges the gap between logic programming and software engineering, offering a versatile platform for building robust and reusable solutions.
 
 
Recommended Resources
Chocolatey is a software management automation tool for Windows that simplifies the installation and management of software packages. In this section of the website, Chocolatey provides a package for installing Logtalk, offering various options for installing the programming language. Additionally, Logtalk can be installed via the Windows Subsystem for Linux and one of the Linux installers listed on the Logtalk download page. Logtalk is an object-oriented logic programming language.
https://community.chocolatey.org/packages/logtalk
GitHub is a developer platform that allows developers to create, store, manage, and share their code. The official GitHub repository page is associated with several repositories hosting various implementations, forks, branches, tools, and utilities designed to facilitate the language. The Logtalk source code and documentation are available under an Apache License, along with a Logtalk 3 community forum that features announcements, ideas, polls, Q&A, and other discussion topics.
https://github.com/LogtalkDotOrg
This is the official website for Logtalk, a declarative object-oriented logic programming language that extends and leverages the Prolog language with modern code encapsulation and code reuse mechanisms, while also providing improved predicate semantics. The language is described here, including its rationale, features, documentation, guides, support options, news, updates, and an informational blog. Information about available developer tools is featured, and downloads are enabled.
https://logtalk.org/
PyPI: Hercutalk - A Jupyter Kernal for Logtalk
Maintained by Paulo Moura, this is a Jupyter kernel for Logtalk based on the prolog-jupyter-kernel and IPyton kernel. The project is a fork of the prolog-jupyter-kernel project, which is still under development. It includes back-ports of recent patches and improvements. Major changes are committed, and more are expected. Included is a project description, release history, and downloads for the source distribution or built distribution, licensed under an MIT License.
https://pypi.org/project/logtalk-jupyter-kernel/
Softpedia is a comprehensive software and tech news website based in Romania. It serves as an index, review platform, and host for downloadable software across various platforms. This section of the website introduces the Logtalk programming language and makes the most recent version of Logtalk available via download, along with information about its licensure, a brief description of the language, and a changelog. Viewers may also add it to a watchlist, send an update, or make a report.
https://www.softpedia.com/get/Programming/Coding-languages-Compilers/Logtalk.shtml
Visual Studio Marketplace: Logtalk for VSCode
Logtalk for VSCode offers full syntax highlighting for all Logtalk built-in control constructs, directives, methods, and predicates and syntax highlighting for ISO Prolog standard built-in constructs. The extension includes snippets for Logtalk entities, such as objects, categories, and protocols, as well as Linter, which detects errors and warnings while compiling Logtalk source files. Installation information is presented, along with version history, and ratings.
https://marketplace.visualstudio.com/items?itemName=LogtalkDotOrg.logtalk-for-vscode