Why use interface instead of pimpl

The opaque pointer (pimpl) idiom has been inherited from C language where it is used to encapsulate implementation details. However, both old-school and "modern" C++ dispence you from writing some ugly code, and allow to use interfaces with object factories.

The example of implementation with both pimpl and interface approach is as follows.

Using RapidFort on Windows WSL

RapidFort services can optimize and secure your containers. The command line interface (CLI) tools enable you to interact with RapidFort services.

See also the official manuals.

The "native" way is using a Linux distribution on your desktop. However, the majority of desktops are running Windows. Fortunately we have WSL (Windows Subsystem for Linux).

Step 1. Setup WSL

Install WSL from command line or PowerShell

All expressions of 123456789 and signs +/- which value is 100

Suppose a string of ordered cyphers 123456789. You can insert signs "+" and "-" between any cyphers to make a correct arithmetical expression. The problem is to find all expressions which sum is 100.

This problem may be interesting for dynamic script languages having the function of a string expression evaluation.

E.g. solving in bash


Subscribe to Mechanics of software RSS