>At the November 2016 C++ standards meeting, the C++ standards committee changed the syntax for exporting a module from
>export module Bank;
>to
>export import Bank;
form is function
and function is form
>>60343639
uses fewer reserved words
I still don't understand why people want modules in C++ though
>>60343639
Why do C++ references exist? What's wrong with just using a const pointer and enforcing const correctness?
The magic syntax of C++ references is ugly as fuck.
>>60343664
this.
The old way is much clearer.
I think is because a lot of young programmers have hadn't much experience with C style compiled language because all schools teach nowadays is communism and javascript. and (((Microsoft)))
>>60343762
>Why do C++ references exist?
If you use a reference, the address will be automatically dereferenced. If you use a pointer, it won't.
So if you use a pointer p, you'll always have to type *p every time you want the value. But if you use a reference r, you can just type r to get the value.
Basically, references make the code look cleaner by automatically assuming the * where it's needed.
>>60343664
>I still don't understand why people want modules in C++ though
Because header files are a garbage solution that are error prone and slow down compilation.
In fact, symbolic modules were feasable before C existed, K&R just botched it.
>export import
Why not
>import export
>>60343639
from
>verb noun [name];
to
>verb noun [name];
They surely work hard for their money.
>>60343762
A reference is guaranteed to be valid, and does not have a "null" state. So when you have a reference to an object, you don't have to worry about it being a nullptr or something.
>>60344464
THICC
>>60344544
>you don't have to worry about it being a nullptr or something
int* p = nullptr;
int& rp = *p;
i know its evil but its possible.