Become a Creator today!Start creating today - Share your story with the world!
Start for free
00:00:00
00:00:01
C++ is Still Here, Still Powerful with Gabriel Dos Reis image

C++ is Still Here, Still Powerful with Gabriel Dos Reis

Hanselminutes with Scott Hanselman
Avatar
5 Plays2 days ago

In a world of Rust, Go, and Python, why does C++ still matter? Dr. Gabriel Dos Reis joins Scott to explain how C++ continues to shape everything from GPUs and browsers to AI infrastructure. They talk about performance, predictability, and the art of balancing power with safety...and how the language’s constant evolution keeps it relevant four decades in.

This episode is sponsored by Tuple and tldraw

Check out https://tuple.app/hanselminutes for the best remote pair programming app on macOS and Windows

Check out https://tldraw.dev/hanselminutes for the infinite canvas SDK built with TypeScript and React

Recommended
Transcript

Introduction to Developer Collaboration Tools

00:00:00
Speaker
Hey friends, it's Scott. I want to take a moment in the middle of the show here and just thank our sponsor, Tuple. I'm chatting with Johnny Marler from Tuple. You know, Johnny, why do most screen sharing tools suck so much for developers? Like business folks, they love a good Teams call or a Zoom call, but for programmers, it just doesn't feel the same.
00:00:18
Speaker
Yeah, I think you know business people are doing something completely different than developers. you know They'll get on a call and they'll share slides or share a doc and just use it to talk.
00:00:29
Speaker
But you know when we're developers, we're actually creating something together. So it's really nice to have that tool that's specifically tailor-made for that process. um I know if you're a programmer and you've done any pairing, we've all been there where you know you're trying to dictate, hey, no, change that function, no, and not that line, that line, or you're trying to to verbalize a CLI command is space or dash or was it forward or backslash? it you know, when when I'm pairing, I need, I don't know about you, but I need all my brain cells.
00:00:58
Speaker
um and I don't want to be wasting them, like trying to verbalize that communication. So um tuple just makes all that easy. You get one click annotation tools. um You can share control by default. There's no so hidden settings that you have to go through. And there's no like Chrome or like ah UI that's covering up your IDE. It's just It's just made for programming. And um I think once once you try Tuple, it's it's really hard to go back to generic screen sharing tools.
00:01:24
Speaker
It's really hard to go back. Actually, that is super true. You can check it out at tuple.app. It is the best tailor-made remote pair programming app for both Mac OS and Windows.

Gabriel Dos Reyes on C++ Experience

00:01:37
Speaker
Hi, I'm Scott Hanselman. This is another episode of Hansel Minutes. Today, I have the distinct pleasure of chatting with Gabriel Dos Reyes, Dr. Gabriel Dos Reyes, Principal SDE at Microsoft and C++ plus plus expert. How are you, sir?
00:01:49
Speaker
I'm doing pretty good, Scott. Thanks for inviting me on your on your show. Yeah, thanks for spending time with me. you have You've been ah an expert for the better part of 30 years in C++. plus plus I learned it in 1992 as part of my undergraduate. and um But honestly, i have to be honest, I haven't really used C++ plus plus since college. So I understand a lot has changed. It is not the language that I learned.
00:02:13
Speaker
Yeah, I think that is true. I only started in 95, so you're way ahead of me. And by a series of coincidences, I became part of the yeah C++ plus plus Standards Committee in 97.
00:02:27
Speaker
And yeah, the language has changed a lot since I learned in 95 and in 90s, and it's very different. How do you accidentally end up on the ISO C++ Standards Committee after only two years of spending time with the language?
00:02:43
Speaker
Oh, yeah. Well, my professors are no longer around here, so I could confess that I skipped the algebra classes and spent too much time in the computer room playing with GCC and trying to fix stuff. And I um ah made see ah this error thinking that a compiler is just a software and if it has bug, it could be fixed. And and trying to fix it is what got me into the standards committee.
00:03:12
Speaker
So you tried to fix something and the next thing you know, you're on a mailing list and the next thing you know, the people on the mailing list say, he sounds like hey he knows what he's talking about. Come to our meeting. Yep. My first contribution to GCC was in 97, so when 97 was the implementation of Valery, so the numerical components, and it has a bunch of issues. So I reported them and I was told, well, the way you get them fixed is you join your national body organization.
00:03:40
Speaker
I was in France at a time and that was after. And said, oh yeah, come over here, but you have to go to the meeting. so Now back in the day, of course, there wasn't Git. We would send patch files around via email on the Usenet. Is that correct, sir? Yeah, it was correct. now CVS ah is what we're we're using. And yeah, it's very different. Mail, you know, if you if you follow GCC development these days, I think it's still mail. There is no, yeah.
00:04:08
Speaker
Yeah, I think I was using Elm or something. It was very a very different time. but you You basically send patch files around, basically diffs. Yes, And then you download the diff and you apply it to your local build and see if it worked. Exactly. It was very line by line. It was very crafted ah time. Yes. And the comedy review that you get is actually clearly on the diffs like that in the files, yes.

Microsoft's Evolution and C++ Standards

00:04:35
Speaker
Wow. And now you're at Microsoft and you've been at Microsoft almost 13 years. Correct. Yes. Honestly, this might be a spicy question, but like, how does someone who is in the free software foundation for 16 years end up working for like the, at the time, the evil empire?
00:04:53
Speaker
a Very good question. and And honestly, if you had asked me that question in 2002, oh, would you work for Microsoft? I would say, hell no.
00:05:04
Speaker
And that was known as an opinion. By 2013, I think the company has gone under a lot of changes. And it was also around when Satya Nadella was talking. I mean, Satya took over in 2014, not during September. But The changes in terms of you know openness to so open software was already underway. And ah given my interest at the time, things just a aligned. And I have been having a very good time since then.
00:05:39
Speaker
When I joined, the the the division really wanted to have a ah a standard conforming C++ plus plus compiler. And I'm like, yay, counts me in.
00:05:50
Speaker
So that was the thing, though. That was the promise. I think when Microsoft really joined the standards community and said, we're not making the Microsoft C++ plus plus compiler, we're making the best, most compliant C++ plus plus compiler. That sounds like that was an attractive thing for you. Yeah, it was. And I would say one thing, like since I joined in 2013, there has not been not a single Microsoft dialect of C++ that I'll put out.
00:06:16
Speaker
And before I joined, there were quite a you know few yeah descriptions, but Since I joined, we got C++ 17 conformance, 14, 17, 20. the team is working on 23. And we are very much engaged in the C++ plus five standards and in the community. We really want to have the best C++ tool set on the Windows platform.
00:06:40
Speaker
Now, when I mentioned I i learned in 92, 93, like early, early, early days, this is before the standard template library. yeah So I was getting out of C++ right as the STL and iterators and the templates that we now know today were were were happening.
00:06:58
Speaker
Why do you think that people think of C++ plus plus as this old crusty static language when so much has happened? I mean, there's literally been like 23 versions.
00:07:10
Speaker
since i got out of it. So that's actually a very good question. i don't know if there is one single cause for that, you know.
00:07:21
Speaker
I think the first is C++ plus plus has tried very hard to be compatible with C. And then the version that many people learn was now the version C with classes. If you were C with classes and in the 90s or 2000s, it would still work today.
00:07:38
Speaker
So you know that stability in terms of compatibility doesn't in itself sell as, hey, there is new thing, right? the summer library came in, it was a complete change in terms of thinking like what do you call people call paradigm shift. But because of these sort of aspects of C++, plus which is going to be compatible with what already exists, there was not a lot of push to say, hey, go and rewrite your stuff. you If you already had something that was working,
00:08:12
Speaker
unless you have business incentives to modernize or to rewrite it, the language itself is not going to force you to, hey, you have to rewrite everything, otherwise I'm not going to compile.

C++ Language Development Challenges

00:08:24
Speaker
right and So I think that contributed to that fossilization of the idea that ah this is old and so forth.
00:08:32
Speaker
And the other thing is that collectively, some of people like me who go around and telling people what C++ plus plus is, not... but we do not I don't think we have always done a good job at showcasing what modern C++ plus plus is. like we we know A lot of people go around and give talk about what it looks like, what it feels like, and so forth.
00:08:54
Speaker
But sometimes you know the proof of the pudding is in the eating. like We have to showcase really good app killer that's is written more than C++ pluslyers and got people into there.
00:09:05
Speaker
Just like the STL itself did, right? The STL says, hey, this is how you do things. opens people's minds to new perspective. We need something like that for the newer features.
00:09:16
Speaker
Yeah, I think you're right. I feel also that the reputation is not as much rooted in what is happening today and more in how it evolved, because you're absolutely right. You nailed it. I learned C with classes.
00:09:31
Speaker
And then I said, oh, that's C with classes. And I've held that internal bias And all the K&R style code and where I put my curly braces today in 2025.
00:09:43
Speaker
And it's great. You can still compile K&R, like a 1989 K&R style code that'll compile today. But sure you're carrying the weight of 40 years of backward compatibility and all the foot guns and everything.
00:09:56
Speaker
While maybe rust and go, they get to pretend that they just got made up fresh. And what's happening is they're learning all the lessons of 40 years of C++ plus plus and then ignoring all the backwards compatibility.
00:10:10
Speaker
Yeah. Yeah, it's extremely hard to live with history. Like backward compatibility, stability is a feature in itself. If I come to you every two years and say, hey, Scott, I got a new fantastic way of writing, and you have to throw away your previous code, which was working because I have this new thing, i think at some point you'll like, I'm done. But if I come to you and say, hey, have new stuff for you, will still make sure what you had before is working because your business depends on it. But when you have an opportunity to upgrade, this is how you can do it, then the whole thing becomes, you know yes, I'll take that. Then you prioritize based on what your customers are asking. and And sometimes you get a first-in-function. Like these days, memory safety important.
00:11:02
Speaker
uh it's a big thing so you know now there is a forcing function to go back and re-examine like take a hard look at how you're writing your code and here is a different way of expressing the same ideas that are devoid of those foot guns and traps and so forth so it becomes okay do i rewriting go rust or java c sharp or can i take an incremental ah renovation of the house, if I can so so know speak. know I'm still servicing my customers, but I'm making it better and safer.
00:11:39
Speaker
oh Let me try this analogy and let me tell what you think. So, you know, certainly you speak C++ plus plus and you speak C++ plus plus over time. Yes. So you speak both the C++ plus plus that I learned and you speak, we'll just pick a number, C++ 17, as well as 23 and then future 26. So for you, the language is not just, I know C++, plus plus but I'm an expert and there's a temporal line. Correct. Correct. Now, what, how many human languages do you speak? I know that you took your PhD in France. Yes, so I was born in Togo, West Africa, and my native language is Evey.
00:12:19
Speaker
So when I talk to my mom and and my family, we speak Evey. But when I talk to my friends in France, I speak French. My wife speaks French. And of course, immigrated to the US, so you know with most of my colleagues, I speak English. um Probably three languages and My daughter got me interested in Japanese, which I'm learning. It's very fun. Interestingly, it shares some similarities with my native native language. So but there is that. And of course, then we have the computer languages.
00:12:53
Speaker
ah which is not human languages, but again, it is all about expressing ideas with different ways of looking at things. Okay, so then if you grew up in Togo speaking, you said it was Ewe?
00:13:09
Speaker
Ewe, yes, E-W-E, yes. E-W-E, Ewe. I'm assuming that the Ewe you learned of the 80s is not the Ewe of the modern time. Absolutely. Last time I went back and I was...
00:13:21
Speaker
having quite a few difficulties first few days, you know, speaking colloquial and things have evolved. and Exactly. So there's like, if A14 and if are like not the same language. Yes, exactly. Right. And like my wife lived in Paris and she speaks French. And when we go to Canada, She discovers that they are not as appreciative of her 1990s Parisian French.
00:13:49
Speaker
And they would very much prefer that she speaks, you know, the way, a you know, proper Quebecois. Exactly. So I feel like we don't talk when when we talk about knowing a language, we don't talk about the temporal aspects of it.
00:14:02
Speaker
You know, your French may be modern, but it may be more suited to your conversation with your spouse and the time that you spend in France rather than modern slang French. Absolutely. Absolutely. So that analogy works. Premium languages.
00:14:19
Speaker
Exactly. Yeah. When my wife goes back to Zimbabwe, they'll tell her she speaks like an old auntie and they don't know, like she doesn't know the street Zulu, the street Ndebele that they speak. Do you have trouble holding all the C++'s in your brain? Because C++ plus plus seems to reinvent itself every three years.
00:14:39
Speaker
it It does. Sometimes, yes, it is difficult. So, you know, to give you a a concrete example, the product I work on on daily is the MSVC tool set. There are some comments there that dates from the 80s.
00:14:53
Speaker
Oh, seriously. Well, you'll just be looking around and you'll bump into a comment from the Yeah, and the team is also using the latest features of C++. So this temporal language we're talking about, my team's already practicing that. So when we go in and we find bugs, we need to fix bugs, then they have to go, oh,
00:15:16
Speaker
Why did they write this way? Oh, this is the way we used to express things, right? So you have to do some kind of reverse engineering and then have to walk that idea that was expressed in certain ways through time to what it is today, capture that wisdom, and then kind of write doc and you know try to have the team observe that thing through code review or just like post-mortem summary. Hey, this is what happened. It is how we we we we did it and and so forth. I think we need to do a lot more of that to the public, not just like keeping the team, but as actually disperse that wisdom to the rest of the community to help everybody else like move forward with this knowledge that we accumulate over time.
00:16:09
Speaker
Yeah, yeah.

Teaching and Evolving C++ Practices

00:16:11
Speaker
hey friends it's scott i love thanking our sponsors because they make cancel and it's possible i want to introduce you to tl drop this is freaking cool right have you ever wanted to build an app that kind of works like mirrorro or figma it's kind of zoomable infinite canvas it's multiplayer it's really good and you want to build it in react with normal react components on the canvas tl draw it's the world's first best and only sdk for building infinite canvas apps in react takes care of all the canvas complexities the camera the selection the undo the redo so that you can focus on building the features that matter to your users okay it's really fantastic it's easy to do this plenty of examples and starter kits there's a whole kit you can even use AI to create things on the canvas check it out tldraw.dev slash Hansel minutes and you can just run NPM create tldraw spin up a starter kit try it out it's got a multiplayer backend that works great. You can also self-host that.
00:17:12
Speaker
I love this stuff. It's just it's normal website things. I'm an old-school website person. This is just a React component. It can do anything on the canvas that you want to do. HTML, CSS, SVG, normal web stuff. It's really great for interactive components, rich content, text editors. tldraw.dev.hanselmanage.
00:17:33
Speaker
Check them out. And you were a professor at Texas A&M for a number of years. Yes. m Were you teaching C++ plus plus at that time? So when I was at A&M, I was working in the same group as Bjarne Stroschrup. So if anybody had to teach C++, that was Bjarne.
00:17:49
Speaker
Oh, okay. So you were Bjarne Stroschrup's colleague? Oh, yes, yes. Bjarne Stroschrup collaborating with Closely since 2002. Oh, wow.
00:18:03
Speaker
And we you know authored few papers together and many C++ plus plus key features like concepts concept, constexpr, and some other stuff like data structures like IPR, it's internal representation. That is a project that I started with Biani. So ah back at A&M, I was teaching Java and Haskell.
00:18:26
Speaker
but Yes. Yes. those are so So for undergrad, i was teaching Java and Haskell. And for the graduate, I was teaching code analysis, static analysis, language design, compiler construction.
00:18:42
Speaker
isn that and And C++ was. ah Yeah. Okay. When, when, have you, have you ever taught C++ plus plus other than, I know you speak at conferences. Yeah. I teach C++. plus plus So I want to give you a concrete example. Quite a few times, uh, industries in France would actually ask me over summer to come over and teach people who are already practicing, like they're professional. They, they, they want to update their knowledge. to reset advancement. And yeah, I would go and and and teach that. now
00:19:16
Speaker
So when you teach it, remembering that that some of the people who are listening to the show and myself are still C++ plus class people, do you teach kind of the generations? Like there's the C subset, there's the object orientation layer, there's the template layer, there's the functional layer, and then there's the compile time meta layer? Or do you just drop them into modern C++? Yeah.
00:19:37
Speaker
I tend to structure my teaching around problems that I consider, you know, temporary, a contemporary, right? Yes, there is the historical view of the language, like, you know, behind the scenes of classes. And that is interesting if you're, you know doing archaeology or history of C++, which are really interesting topics in themselves, right? But if your job is to get something done and engineer, not just program, I make a distinction between programming and engineering.
00:20:13
Speaker
right So when you're doing engineering, you're not trying to be to have the cutest you know solutions possible. you You're trying to have something that is solid, that can sustain it ten the the test of time over, say, five, ten years.
00:20:29
Speaker
Because you don't have the luxury of going every six months and updating the new thing. you You want the program to be dull. But if if it is too exciting, no, you've lost everybody. Right?
00:20:43
Speaker
You want to keep it dull and robust. So that is engineering. That's what you want to do. So i I'll take just a couple of problems from the domain. And it's like, well, here is what we have. How do we express constraint? right So usually engineering is you have bunch of constraints.
00:21:01
Speaker
they They tend to be intention. And then you try to find a path. that gives you something that is robust and that you can teach the next generation. Because if you're successful, you're probably going to get promoted or you're going to get help from someone. And if you require the person to that's going to help you to be at least as smart and as cute as you are, maybe they're smarter, cuter, and they'll get promoted by you.
00:21:28
Speaker
ah Right? So you want to make it accessible to the mass. And that is what I and i consider the... the good part of programming, know, engineering program, and then expressing those ideas in C++. plus plus So ah these days, I'll say, yeah, let's start with constexpr by default, because we know an that if you declare a global variable, you shouldn't have many of those. But if you did, and then you have to rely on runtime initialization, you know, if the guns are there.
00:21:57
Speaker
So what I want to say is, well, if it is constant, I want to use ConstExper to ensure that if I ever accidentally make a dynamic initialization, the compiler will tell me. So I'm getting assistance from from the compiler.
00:22:11
Speaker
Back in the 80s, were all doing template metaprogramming. Let me show you how cute I am and so forth. but That doesn't scale. If you have a constexpr function, you all you want to do is raise the runtime computation to compile time.
00:22:29
Speaker
So you want to express with the same notation to make it easy for people to to access. And so I teach along those lines. Let me ask this question, and hopefully it's not ah inappropriate, because I like that you said that programming is not software engineering. I literally was in a Mark Russinovich paper recently, and that line sits exactly there. Like, programming is a thing. Software engineering is a different thing.
00:22:57
Speaker
And in fact, when I went to school, I had to choose between computer science and software engineering as a degree. degree And software engineering was the practice of the shipping, which is different than computer science. But is it fair to say that the tooling and the build ecosystem and the lack of an official package manager is famously difficult.

Improving C++ Tooling and Safety Profiles

00:23:19
Speaker
There's different ABIs, there's different multiple compilers, there's different header inclusion model models. If you want things to be dull, wouldn't C++ plus plus bless a package manager and try to solve some of those issues to make things more dull? Yeah, so you're absolutely correct that... um An area that has been neglected by the um C++ plus plus community and committee is tooling aspect, like package management and build systems and editors and and all those kind of stuff. right
00:23:54
Speaker
And that has done two things. One area, it has allowed you know the flourishing of different ideas. Like today, we have VS Code, Visual Studio, we have Sea Lion. And so people go in different directions, try to explore ideas.
00:24:14
Speaker
and And that way, we we don't suffer from you know you know monoculture, one way of thinking. On the other hand, it has fractured the community, make it much ah easier it It has fractured the community, making it much more difficult to advance things like programming should be dull.
00:24:39
Speaker
Like if today, if I want to start with a beginner and show some graphics,
00:24:50
Speaker
It's much more difficult than it needs to be. With Java, just you know have package, downloads, done. In C++, it's a little bit more difficult, so I agree. So it feels like you're saying that the language evolved, but the ecosystem, which is not the language, may be a little rough around the edges. And in a managed ecosystem, managed by ah maybe a bigger community or a company, Python, Node, Rust,.NET, a new developer might have a little bit less...
00:25:18
Speaker
you know, rough around the edges, but C++ plus plus is very popular. Maybe the ecosystem could use a little love and you could come up with a help build manager. I agree. You're right on point. So when I designed a module system for C++ plus plus in 20, so these problems we had before, everybody was dealing with them, but now with modules, it became in your face. And one of the things that I asked Herb Sutter when he was running, the C++ community was to create a study group dedicated to tooling. so we have you know
00:25:50
Speaker
Somehow the community has not acknowledged, hey, build systems exist. so We have been doing a lot of work to kind of um ah harmonize the various ways of invoking the compiler, setting the build systems and building modules and and so forth. so I'm actually very happy with that outcome that with a new major feature in the language, we now have to tackle heads on these decades old problem that we had neglected.
00:26:20
Speaker
Yeah. And now another series of things that have been neglected, or at least the community thinks have been neglected, is like safety profiles. the All the classes of bugs that have that would have the news, have the hacker news, believe that everyone is rushing to rust because it's just safer, it's just better. C++26, which is in flight right now, promises to basically solve an entire class of bugs around bounds and type and lifetime and arithmetic.
00:26:48
Speaker
Yes, so that that was an area where Bianni Stroszner and I collaborated again and with some help from from Herb Sutter. So the the basic idea is that it is possible to write memory safe programs in C++. plus plus So it is possible. But what is actually at issue is not the possibility. It is not proof of existence. It is the scale. How easy is it by default to write memory safe programs?
00:27:22
Speaker
I think that is a real problem that we need to tackle. And that is what Bjarne and I have been tackling. Again, the idea is evolution. You can do revolution by just throwing everything out, or you can have the thing that is working and upgrade in place. And c plus plus profiles are one way of getting there, and I actually believe is a very good way of doing it.
00:27:45
Speaker
Unfortunately, we were not able, Bialy and I were not able to convince the C++ committee to get profiles into C++26. Oh. We're... oh we are we pursuing that aspect parallel to C++26.
00:28:03
Speaker
Right now, there are some other features that have been considered, like contract, that if done properly, would allow you to express the requirements and guarantees of a function. What does a function require of its argument? Once a se execution is done successfully, what does a guarantee require?
00:28:23
Speaker
If you can't express this thing very simply, then you can take advantage of code analysis, like whether it is static or runtime instrumentation, to actually provide more guarantee or mitigation measures.
00:28:37
Speaker
Unfortunately, there are still aspects of that feature that are not really there. and we are trying to fix them or at least move them into a parallel track that will be released at the same time as C++26. So essentially, you can think of it like you have core C++26, and then you have these other things that come with it on the side that you can use in practice to have a better experience with C++. plus plus okay
00:29:08
Speaker
if If someone were going to get started now in C++, plus plus they still go to the books and they find a lot of old books with a lot of old samples. Yes. I personally haven't found the great starter C++ plus plus book for the 2020s.
00:29:24
Speaker
ah But you can build that up by watching YouTubes. You've been presenting at CppCon for years. Like there's a ton of readings and reference, but it doesn't feel like, unless I'm missing a book, that there's a welcome to modern 2020 plus book.
00:29:38
Speaker
yeah plus So actually, Bjarne Stroschrup wrote an updated a book called A Tour of C++, plus plus I think the second edition, which talks about C++ 2023. As a matter of fact, the old Halo World program now starts with Imports Modules 2.0.
00:29:58
Speaker
and Int-Man, you know, see out and and and print, right? So it's really trying to cheat you right out of the gates, the modern C++, the contemporary C++. Contemporary, that's the word. Contemporary idiomatic modern Yeah. c plus plus yeah Because that's what powers AAA games, right? That's what powers exactly big stuff.
00:30:21
Speaker
Yeah. I will, you know, send you link to that to that book, you know. I don't own any stock in the sale, but I think, as you mentioned, it will be it is a very good resource for people starting to to program in C++.

Mathematics in Programming

00:30:36
Speaker
It is not for complete beginners in programming, but if you have some knowledge in programming, it is a good book for someone starting with programming in C++. plus plus And if you already know C++, it's a good refresher that tells you, well, this is how we write things these days.
00:30:52
Speaker
Yeah. It feels like because we've only just kind of met and spent time together, that you attack things with a very formal mathematical perspective. your're your're your're Your background, certainly your PhD is in mathematics. all right How much does math and the formality of a proof leak into your work pushing the ecosystem forward in your research?
00:31:19
Speaker
It's everywhere. So, for example, when I did constexpr for for c plus plus eleven there was a lot of skepticism. Like some people were like, oh, can't be done.
00:31:31
Speaker
Then I showed implementation. It was like, oh, implementation is unsound. And I have to show proof, mathematical proof that, well, it's actually sound. And that that' is what, it's very hard. It is easy to argue with colors, like I don't like red, green, but it's harder to argue with mathematical facts and logic. So I let math, you know, permit ma everything I do.
00:31:53
Speaker
It's also a way to keep us honest. when i'm doing now When I was doing modules, for example, we needed to formalize the language semantics. As everybody knows, and I'll say that, Bianni will say that, C++ plus trace is a very complex language.
00:32:07
Speaker
So how do you take off that, keep its structure small? If you don't have the math there to keep you honest, you don't have solid ground to move on. So it is there. I don't have it.
00:32:20
Speaker
And also, I don't try to have people get a degree, an advanced degree in abstract algebra before I can talk to them. That is not a point. It's there as a tool, just like the language itself is a tool to write programs.
00:32:35
Speaker
The math is a tool to keep me honest in in engineering. and And you said that you were teaching in other languages. how This is your language, though. This is the one I assume you dream in, right? you don't you don't Have you ever like thought about cheating on this language and trying another language out, or do you always keep coming back to this language? Well, I got my education in the af French system.
00:33:00
Speaker
And so my first language was actually Pascal. You know, we both know Anders Goldberg. So, you know, I learned his stuff. I did Turbo Pascal is that's as well. So 100%. Yeah.
00:33:13
Speaker
yeah So there is no way you can, at the time, you could graduate from the French system without knowing Camel. and later it became OCaml. And the inventor of OCaml, Xavier Leroy, I actually collaborated with him for a long period of time. And one of the things we did, for example, is to have a a mechanized mathematical proof that ah this thing that Biani invented, resource acquisition, is initialization. So essentially, this protocol where you acquire resources in constructor, and then you release them destructor to ensure that you don't have leaking of that. So Xavier and one of his students, Tahina, who is now actually at Microsoft,
00:33:48
Speaker
we worked to provide a mathematical proof that this is a sound protocol. So i I speak C++ plus five as a native language, but Haskell, Java, Coq, which is the proof assistant language, those are languages that I'm also fluent in.
00:34:11
Speaker
Fantastic. So you recommend, though, that people don't sleep on C++. plus plus It's a good time to learn these these languages. We're not old. Yeah. If you want to be a professional software engineer, just learning one language is not good.
00:34:28
Speaker
you You need to know at least two or three different languages, not C and C++. plus sp Let's say C++ plus plus and Haskell. Why? Because they're a completely different paradigm. But what they do is that they help you see ideas in different ways and in retrospect enriches the way you conceive of software.
00:34:50
Speaker
Very exciting. Well, thank you so much for spending time with me today. Thank you very much, Scott. It was real pleasure. I'm glad we've been chatting with Dr. Gabriel Dos Reis, learning all about C++, plus plus modern C++ plus plus in 2025 and beyond. This has been another episode of Hansel Minutes, and we'll see you again next week. Bye.