r/cpp • Meeting C++ | C++ Evangelist • 19d ago

Meeting C++ Interview with Guy Davidson on C++26 and profiles for Meeting C++ 2026

https://www.youtube.com/watch?v=wdVNXRk1cEc
25 Upvotes

11 comments sorted by

4

u/jeffmetal 19d ago

I'm confused. I thought Profiles would allow people to be able to define their own profiles but they are saying it needs compiler support so only the profiles that your compiler supports will work.

2

u/meetingcpp Meeting C++ | C++ Evangelist 18d ago

So was I, and more questions have come up about building with profiles - when its a purely local thing to choose in your C++ files.

But its also early days, and one has to see what will actually become profiles at some point.

3

u/t_hunger 18d ago

Of course you can write our own profiles. All you need to do for now is download the compiler sources and do a bit of coding... as long as you do not use MSVC. Maybe you can send an email and a ton on money to microsoft in that case?

Later we might come up with some standardized machanismn to define profiles somehow... its going to be challenging, considering how different the compilers work internally.

Profiles promissed a lot. We will see what they are going to deliver once we have more than toy-implementations a few people play around with.

1

u/pjmlp 19d ago

Of course they need compiler support, how would you define lifetimes profile on your own, or how underflow, overflow is handled?

-1

u/jeffmetal 19d ago

I was expecting the main functionality to be put into the compiler and then me to be able to pick and choose which bits I want and define that as a profile. Some are probably doable now like no c style casts without compiler changes.

2

u/pjmlp 18d ago

The ones that are doable without compiler support you can already make use of clang-tidy, VC++ /analyse rule files, PVS Studio, Sonar, and similar, to have similar outcome.

The problem are the ones that are sold to achieve much more, while obeying the same conditions under which, they ruled out Safe C++, or similar proposals with viral annotations or changes to the standard library.

-1

u/jeffmetal 18d ago

Is the difference with profiles I can set them on the code and they get applied all the time while clang-tidy is opt in.

I'm not convinced profiles can achieve memory or lifetime safety either but improving the parts it can is an improvement at least. For everything else it sounds like its time to spin up agents and rewrite into rust if you really want those. AI has come a huge way in the last 2 years. My bet is the ability for it to rewrite c++ to rust will come quicker then profiles which is a half measure anyway.

32

u/AutomatonA 19d ago

yep, thats how c++ devs look

3

u/Diegam 19d ago

Oh my freaking God!!! That's literally my look!

-5

u/FitReporter9274 19d ago

Has Guy Davidson ever had a paper accepted into the C++ standard?

3

u/Dragdu 19d ago

Didn't he originate linalg as well?

But yeah, as long as your argument for standardization is "we can't use nonstd deps, please standardize random shit libs for us", I hope your papers don't make it.