C++ Logo

std-proposals

Advanced search

Re: Making C++ easier for new students

From: Ivan Matek <libbooze_at_[hidden]>
Date: Tue, 3 Aug 2021 19:44:13 +0200
On Tue, Aug 3, 2021 at 8:05 AM Bill Kerney via Std-Proposals <
std-proposals_at_[hidden]> wrote:

>
> After having taught C++ since, hmm, I guess technically 1997, but full
> time as a faculty member since 2015, I can relate to you all the questions
> I get asked which don't have a very good answer in the language and
> standard library:
>
> In my personal opinion C++ will never get good in this areas. Reason is
that C++ standardization has very limited resources and they are mostly
spent on making language better for professional developers. For example
there was proposal for sane main() arguments,
that never made it into the standard. And some new additions ( <=>,
deducing this) while making language more powerful actually make it even
more complex...
In your particular case unfortunately most beginner programs are read/write
to terminal, but I think I have ever seen a program like that made in any
company where I worked for. So it is unrealistic to expect that you will
see some huge improvements there when we are missing some production stuff
like reflection, pattern matching, efficient hash maps, basic networking,
executors... not to mention that compiler error messages are still
horrible...

Then again I was surprised to see fmt/chrono additions in C++20
standardized , so I could be wrong...

One positive thing to mention if you are using vcpkg you could teach them
how to install abseil, that solves your number 8
<https://abseil.io/docs/cpp/guides/strings>. Maybe some other people could
suggest robust nonstd libraries for some of you other points. In general it
is a good thing to teach students to look for existing solutions.

On a higher level other people have mentioned I am not sure you are doing
your students favors by teaching them C++(except if you want to show them
how low language primitives like arrays and malloc can be wrapped in nicer
higher level language).
Nobody can predict the future, but I would consider teaching them Rust.

Received on 2021-08-03 12:44:27