[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

>At the November 2016 C++ standards meeting, the C++ standards

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 13
Thread images: 2

File: jackiewtf.jpg (42KB, 680x441px) Image search: [Google]
jackiewtf.jpg
42KB, 680x441px
>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.
>>
File: 1468793612675.jpg (42KB, 452x530px) Image search: [Google]
1468793612675.jpg
42KB, 452x530px
>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.
Thread posts: 13
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.