C++ 20 introduces modules, a feature that eliminates the problems introduced by traditional header files. The syntax of using a module: import , is quite similar to modern scripting languages like Python and JavaScript. I’m very curious about how import works under C++ and what changes does this new feature bring to modern C++. In this article, I’ll try a simple example with modules.

Setup

The modules feature is quite new, so we need the latest compilers and tools supporting C++ 20 standards.

Here I’d recommend Clang 10. Just download the pre-built binaries and make sure you could use clang++ tools…


🎉 Dreaming of VS Code editing experience in JupyterLab? Now, it becomes a reality.

Screenshot

Introduction

JupyterLab

Just a few months ago, on February 20th, Project Jupyter published an article JupyterLab is Ready for Users, announcing the next-generation web-based interface for Project Jupyter, which is powerful and have many exciting new features.

Fing

Graduate Student at Cornell University | Ex-Intern at Uber, Microsoft |Open Source Enthusiast | GitHub: mtobeiyf

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store