Tag: C++

std::tuple is a widely used abstraction in C++ and has been around since C++11. It is a generalization of std::pair. std::tie is convenient when we want to create a tuple of lvalue references to existing variables. It is a function template commonly used to unpack a tuple into individual objects. In the above example, we […]
This is the third and the last article in the series “Why Learn Language-XYZ?”. I talked about Prolog and Lisp earlier. The present article is on C++. Once you have gained reasonable proficiency with Prolog and Lisp, you are ready to learn C++! In my view, C++ is a complex language and requires sufficient maturity […]

Title: Embracing Modern C++ Safely Authors: John Laos, Vittorio Romeo, Rostislav Khlebnikov, and Alisdair Meredith Publisher: Pearson Education, Inc. Year: 2022 C++ is a complex language. Fortunately, we have several good books (and other online material) for programmers at various levels. A few weeks ago, I had reviewed and recommended “Beautiful C++”, book suitable for […]

When you program in Rust, especially in a non-trivial project, there is a good chance that you will need to call “external” functions (usually, C/C++) that are available in a DLL (we are talking about the Windows platform here). It could be because you wish to re-use some code that you have earlier written in […]

Traits in Rust are an amazing feature and contribute significantly to the expressive power of the language. For someone coming to Rust with a C++ background (like me), Traits appear to be quite similar to Abstract Classes in C++. Although they are similar, Traits have certain characteristics that set them apart. In this article, I […]

The Ring Programming Language, designed by Mahmoud Fayed, has been around since 2016. I came to know of it quite accidentally two weeks ago when I received a promotional email from Apress about their book “Beginning Ring Programming” by Mansour Ayouni, published in 2020. I immediately did a google search about the language and finding […]

iLexicon is an “intelligent” dictionary that can be used to build Natural Language applications. I have two implementations, one in Lisp and another in Prolog. Both implementations are memory-based, in order to speed up performance. I have written several articles referencing it, for example see this. LiteDB is a NoSQL database for .NET. I […]

In the last article, I showed how we can invoke C# methods from LispWorks Enterprise Edition, through the COM/Automation interface. That approach relied on invoking the Automation methods dynamically, without depending on the Type library (*.tlb). In this article, I will discuss the other approach, which uses the Type library. According to LispWorks documentation, this […]

I have been looking around for a compact embedded NoSQL database library for .NET, to use as the back-end of my “iLexicon” system. “iLexicon” is written in Lisp and Prolog (I have written a few articles on it before). At present, the entire dictionary component (containing over 300,000 word entries) is resident in memory, and the […]
![C++20 [[nodiscard]] Attribute C++20 [[nodiscard]] Attribute](http://i0.wp.com/www.rangakrish.com/wp-content/uploads/2021/01/Example1-src.jpg?resize=675%2C240&ssl=1)
[[nodiscard]] attribute “encourages” the compiler to issue a warning when the return value from a function is ignored. It was introduced in C++ 17 and enhanced in C++ 20 to include a string literal that can be used as an explanation of the warning. Let us look at different cases one by one. Case-1: An enumeration […]
Recent Comments