C++ Logo

sg15

Advanced search

Re: [Modules] Should the compiler try to build std module implicitly?

From: Boris Kolpackov <boris_at_[hidden]>
Date: Mon, 4 Dec 2023 09:06:20 +0200
Chuanqi Xu via SG15 <sg15_at_[hidden]> writes:

> When I start to learn C++, I only need to copy a hello world example
> and run:
>
> ```
> clang++ hello.cpp -o hello
> ```
>
> However, with the current direction of std modules, the beginner
> need to install the build systems and try to copy the build scripts
> that them can hardly understand. [...] But it still seems scaring
> to beginners.

If you look at pretty much every new language that tries to compete
with C++ (Rust, Swift, Go, etc), they all come with a build system
and package manager combo, none of them teach beginners by starting
with a direct compiler invocation, and none of those beginners get
so scared that they jump to C++ instead ;-).

It makes sense to teach basics which one can build upon. It doesn't
make sense to teach basics which one will have to unlearn.

C++ build scripts that can hardly be understood is a problem. A
build by convention, at least for simpler cases, could be a
solution (and which is what all the languages listed above are
doing).

Received on 2023-12-04 07:06:23