Algorithms + Data Structures = Programs - Episode 85: Special Guest Tony Van Eerd! (Part 2)
Episode Date: July 8, 2022In this episode, Bryce and Conor continue their interview with special guest Tony Van Eerd!TwitterADSP: The PodcastConor HoekstraBryce Adelstein LelbachAbout the Guest:Tony Van Eerd has been coding fo...r well over 25 years, and hopefully coding well for most of that. Previously at Inscriber, Adobe, and BlackBerry, he now enables painting with light at Christie Digital. He is on the C++ Committee. He is a Ninja and a Jedi.Show NotesDate Recorded: 2022-06-24Date Released: 2022-07-08Mike LazaridisBlackBerryBlackBerry Bold PhotoChandler Carruth (Google) on TwitterADSP Episodes with Chandler CarruthGary Klassen (BBM) on TwitterOlivier Giroux (Apple) on TwitterJon Lakos (Bloomberg) on LinkedInDavid Sankel (Adobe) on TwitterCppNorth ConferenceTony’s Talk at CppNorth: Value Oriented Programming. Part 1: You say you want to write a functionADSP Episode 24: C++Now 2021 with Ben Deane & Tony Van EerdComplecting Made Easy - Tony Van Eerd [CppNow 2021]Dr. Dobb’s “How Non-Member Functions Improve Encapsulation”Scott Meyers BooksWhat is unified function call syntax anyway? - Barry RevzinC++20 std::basic_string::starts_withIntro Song InfoMiss You by Sarah Jansen https://soundcloud.com/sarahjansenmusicCreative Commons — Attribution 3.0 Unported — CC BY 3.0Free Download / Stream: http://bit.ly/l-miss-youMusic promoted by Audio Library https://youtu.be/iYYxnasvfx8
Transcript
Discussion (0)
That's unified function call syntax.
Uniform.
Unicorn.
Unicorn.
Yeah, it should be called unicorn because we're probably never going to get it in C++.
This is before your time in the committee, Connor, but that's exactly the joke.
Oh, is it?
Yeah. Welcome to ADSP, the podcast, episode 85, recorded on June 24, 2022. My name is Connor,
and today with my co-host, Bryce, we continue part two of our four-part interview with Tony
Van Eerd. Here's another story I just told the other day at work. You would get bugs, right? You know, like I'm working on
BlackBerry. We'd get a bug report that, you know, someone's typing and scrolling and there's the
trackpad and it got confused about whether you were touching the screen or the trackpad or the
keyboard because they're all so close together and stuff, right? And it's like, hey, can you
like filter out the mistaken touches, right?
Like if you're swiping the trackpad,
you want to ignore the screen.
You didn't mean to touch the screen.
It was just too close to the trackpad, right?
Which of course I had told them
when they were making the phone
that they put the trackpad too close to the screen.
But anyhow, it's like fix it in software, right?
So you get these bug reports like that.
And the bug is called
a mike l bug because it's not someone complaining it's mike l complaining that he was he was
scrolling his trackpad in it and he got screen input accidentally right and um so those were
like obviously high priority bugs because it's oh it's a mike l bug you got to fix it right away
and my manager would take that part out of the bug. If it said Mike L bug in there, which everyone
just knew what that meant, he would just remove it and leave a comment saying, remove superfluous
information. Because my manager was just like, I don't care whose bug it is. It's either important
or it's not important. And we're just like, man, you're just trying to get yourself fired, right?
But he would do that
um the other part of that story is that every now and then i would be like okay i need to know was
he scrolling up because he touched the trackpad and then the screen or was he like scrolling down
he touched the screen then the trackpad because you know you're going to handle that differently
it's easy to say it's easy when you touch the screen, you can say, well, did you just touch the trackpad
like this many microseconds ago?
Because I'll ignore the screen touch, right?
But if you go the other way and you touch the screen
and then the trackpad,
am I going to delay every screen input to say,
well, let me wait to see if you touch the trackpad, right?
Yeah.
I think I ended up actually with,
there's a region at the bottom of the screen
where I do delay the touch input
because it's like,
well,
wait and see if you touch the track bed.
But anyhow,
I needed to know which,
what,
you know,
it's like someone go ask Mike L what was going,
like,
give me more information.
And the people that,
because he's not obviously not logging his own bug,
right?
Someone else logs the bug for him in this,
into the system.
You ask that person,
it's like,
I need more information.
They're like, oh, yeah, we'll talk to Mike and we'll come back to you.
And they never get back to you because they don't talk to him
because they're afraid to because he's the big bad boss.
And so finally one day, every company has their all hands
and all that kind of stuff.
So I went to one of the all hands.
I waited to the end.
Mike Ells does his stalking.
I walked up to him at the end. said hey i got a bug i need to know like tell me tell me i need more
information he's like oh yeah sure no problem blah blah blah we talked about this bug for five minutes
and i told him i said look i've asked for this information no one will give it to me
and he's like just come to my office just come come find me. And I'm like, excellent.
I am now like firsthand, you know, first name basis with Mike.
Just, hey, buddy, Mike.
You know, just walk in when he's got a big meeting with somebody.
Say, Mike, I just got to, everybody stop for a second.
I got a quick question for Mike here.
He's my guy, my guy Mike, you know.
I'm important.
Yeah.
And then I left the company.
So I didn't actually get to use my power i don't think it was
right before i left and for those of you that are extremely confused on why uh tony was talking
about a trackpad on a cell phone uh i will link a i will link a photo of i'm not sure i had a
blackberry bold i think it had one of those trackpads yeah you had a blackberry he's canadian
we give every canadian gets one when they're when they're born yeah when you when you graduate high
school you got one i had a flip phone or slider phone when i graduated when i was in high school
and then i used that into university but as soon as i had my first co-op at manulife in toronto
i thought to myself well i'm i'm joining the world. I'll be ostracized if I show up without a BlackBerry.
So I bought a BlackBerry Bold.
Wait, wait.
You had an iPhone.
I did not have an iPhone.
I had one of those flip phones or slider phones.
Oh, okay.
Gotcha, gotcha, gotcha.
There really is.
Anyone who's played NHL video games, NHL 2K, even like 2K14, 2K15, I don't know when it stopped, but
there's like the trading
general manager mode where you can trade players
with other teams and stuff. It shows
a picture of a BlackBerry phone
as like, hey, you're getting a call from
you're getting a call from, you know,
Vancouver Canucks. They want to make a trade.
And it shows a BlackBerry phone.
And I'm sure BlackBerry paid to get this
advertising built in.
But it was also true.
That was what it would be like to be a manager.
Every manager had a BlackBerry.
There's no doubt.
Every, you know, GM in the NHL
and every sport was carrying a BlackBerry
so that they could do their stuff, right?
Yeah.
BBM was like kind of,
not really like Messenger,
but it was like you could only message people that had BBM, right?
So like it was this, it was like, you know,
I'm not sure if it was before Facebook or whatever,
but it was tapping into the whole, you know, same thing with Bloomberg.
You know, you can't message people.
I think that's changed, but at one point in time,
people on Wall Street, like you were outside of Wall Street
if you didn't have a Bloomberg.
Yeah, yeah.
It's the same thing.
It's a critical mass. everyone's there because everyone's there
um yeah everyone had bbm and then or or well or like the you know the the green bubble versus the
the blue bubble on iMessage you know are you are you another trusted iphone user or are you
the other you know uh chandler if he ever listens to this is
gonna like yeah just tell him now chandler just 10 seconds you got to cover your ears because
i'm going to say the word patent but um i think blackberry has a patent on speech bubbles
in like i message and stuff like that like and gary classen the guy who wrote BBM. And so every phone in the world, you know, does speech bubbles.
And I don't know, you know, it's corporate, you know, patents, right?
The way, you know, they, no one sues anyone unless everyone sues everybody.
And I don't know.
Yeah.
It's the cold war.
So here's the thing.
Back to the patent story.
BlackBerry, when I was there, had 40,000 patents.
Right?
Wow.
40,000 mobile, you know, in a good industry patents.
Right?
And then someone sat down.
Like, how do you figure out how much that's worth?
Do you look at all 40,000 patents?
No.
You do a sampling, right? You sample some
number of patents and you look at them and say, well, this one's worth this much money. This one's
worth this much money. You make some kind of guess at how much this patent is worth. And then you
average it out. And you say, well, every patent here in this portfolio is worth about $100,000.
And so the whole patent portfolio is worth $4 billion.
So like BlackBerry, even if they did nothing else was worth $4 billion because they're sitting on
$4 billion worth of patents, right? But that also means that if I write another patent,
it's worth $100,000. It doesn't matter if it's good or bad, right? Because as long as it's a
patent, it goes into the pool of well on average they're worth
a hundred thousand dollars so every patent i wrote is another hundred thousand dollars on their books
so i'm just like i'll just how many you want do you want you want 10 patents i'll write 10 i wrote
patents for like um uh uh the the the watch right like you when the when the apple watch came out
i'm like how do you you know and i won't get into these it's okay chandler i won't get into these the watch, right? Like when the Apple Watch came out,
I'm like, how do you, you know,
and I won't get into these.
It's okay, Chandler.
I won't get into these patents.
But like, how do you input text on a watch?
It would be really hard, right?
Because it's like a small surface.
But if you really want to input text on a phone,
on a watch,
I thought up 10 ways of doing it.
And so I wrote them all down, right?
And it doesn't matter if BlackBerry would ever implement those patents
I wrote them down
and they send them off
and some of them get
accepted as patents and some don't
and then they give me money
that's what I did
I was like man I can make more money
by sitting here in an afternoon
writing patents
it's just like how at NVIDIA they give me I was like, man, I can make more money by sitting here in an afternoon writing patents.
It's just like how at NVIDIA, they give me a referral bonus every time I recruit somebody.
And I could just turn that into a full-time job.
I have a whole system.
I have a whole system i have a whole system you know uh john lakos who tried to tried to tried to recruit me to be a recruiter after after he gave up recruiting me um he was
just like can you find me stuff because he said like he's like the amount that they would pay
a recruiter for finding somebody in new york? Is like a huge portion of the person's salary.
And he's like, I will give you the same percentage if you find me people.
And I can still stay in.
Because every time he tried to recruit me, I'm just like, I don't want to move from Canada.
I don't want to live.
I mean, New York's great.
I just don't want to live there.
And finally, he gave up trying to recruit me.
But he's like, well, find other people. And I was like, I could probably make more money recruiting people for LACOS than programming on my own. Cause like I'm getting a percentage of some New York salary, but I'm living in Canada. And then I was like, except for, I don't want to be a recruiter. So screw that but every now and then i'll get a co-op student which for you non-canadians
is intern i'll get an intern who i know doesn't want to work for me and i'm like hey do you want
to work in new york because man i can set you up i also just tweeted one from one of my interns i'm
like who wants my intern she wants to work at like apple and then olivier's like send her my way so see it's i i've always terrible nepotism right
there if i didn't want to work in engineering anymore i could go start like i couldn't do a
startup i don't have any good startup ideas but i could i could definitely start a recruiting
company so and it would be a killer so this this is the same thing right like so gary and i left
blackberry all right pause pause pause let's just do some filling in here because I've realized we're doing like, what do you call it?
Like inside shop talk.
So Chandler works at Google.
Actually, no.
Our listeners know because we've had Chandler on.
Olivier.
Listeners who've listened to every episode.
Yeah.
Everyone knows Chandler, anyhow.
If you're in the C++ community.
I mean, we're slowly becoming predominantly C++,
but historically we would talk about other languages at times.
Should we be talking about arrays?
Sorry.
No, don't worry.
But so Olivier, formerly at NVIDIA, now at Apple,
and is from Quebec, Canada.
Lakos refers to John Lakos.
He works at Bloomberg in New York.
Previously, are we allowed to mention that?
The other well-known C++ person
that is no longer at Bloomberg?
I don't know which one you're talking about.
Is that public knowledge?
Oh, yeah.
We can say that?
Yeah, so David Sankal used to work at Bloomberg,
but now is at Adobe.
Yeah.
So right now it's NVIDIA versus Adobe.
I'm not sure which one's Marvel and which one's DC,
but we're just collecting, you know.
Whoa, whoa, whoa.
That's a bit of an exaggeration.
NVIDIA has hired a lot more people than Adobe.
Adobe's hired like one or two.
Okay, so Adobe can be DC.
I apologize, Sean, if you're listening.
Maybe he doesn't watch any superhero movies,
so he doesn't know the difference.
But they've got some, like, they might not have the the quantity but they've
got quality right i got quality too they've got they've got sean parent i got andre that's true
all right all right i got it i got eric all right wait wait dave abraham's eric okay we're tie i think we're still tie
darn it all right but then on top of that i got a lot of other yeah but then there's you
so that's like a down like they they also have sean we don't have a sean yeah
we had we said we i mean we had olivier but now olivier see i could have put you over the edge yeah all right there was like there was this one week
period where before olivier left when andre had just joined and that was that was the peak
peak c++ at nvidia anyways i interrupted because you said when me and gary and i was like all
right i don't know who gary is so we're going to update people, and now you can tell me who Gary is.
Gary, I mentioned Gary.
It's Gary Klassen, the guy who wrote BBM.
Oh, right, right, right.
Okay.
By the way, so Gary works at Google now.
Works at Google in Waterloo.
Gary is the most energetic person I've ever met in my life.
He's the most upbeat energetic like for the first
two or three years i worked with him i'm like i don't believe this person i'm just like there's
not it's not possible to be this upbeat and energetic and positive and but he just is that's
just how he is he's still that way i've known him for like 10 years yeah he is yeah um interesting yeah he's just awesome anyhow um uh he left blackberry and i
left backberry like near the same time but not at the same time and uh we ended up working together
here at christy and we were both sitting here at christy and i was like gary you left blackberry
and at least in this area he is known as you know the guy who invented bbm and in this area, he is known as the guy who invented BBM.
And in this area, BBM is still a big deal, right?
Because BlackBerry was a big deal.
I was like, Gary, we could have started a startup with just your name.
Just be like, Gary Klassen's doing a startup.
Just like one of these, any, think of all the people,
like if Sean Parent went and said he's going to do a startup, right?
People would throw money at him.
This is just because he's Sean. And Gary would definitely we could and i was like gary we'll
think of something but we could just do a startup and then later from a patent writing machine yeah
we'll figure out what we're going to do later you will patent you will patent a process for
developing patents but anybody ever thought about that? Oh, for sure.
That's probably a good idea.
I mean, you could probably now get,
oh, I've got so many sad, scary things
that popped in my head there.
One is that you could get an AI now
to write patents for you, probably, right?
Just pump out some patent crap.
And then, of course, you patent that AI.
Yeah.
So, you know know everyone's talking about
the ai that could be sentient but not really um and it's like yeah it can't be sentient but
how long before that ai is used as a twitter bot that you can't tell anymore that it's a twitter
bot right because that's where we're at and And it's going to get really, really hard for,
for Twitter people to figure out,
Oh,
this is a bot.
That's just,
you know,
spreading information.
And this is a real person.
Cause right now it's still,
you know,
you can do it with the computer to figure out,
you know,
bots sort of,
but these,
you know,
AI things are getting way too good at sounding like a real thing.
Kind of scary.
Anyhow, don't want to put that idea out there for those.
You don't want to.
Okay, good.
We'll make sure that we get it.
No one listens to this.
That is true.
Not as many people as CPP cast, that's for sure.
We'll get there. we'll get there we'll get there
we may not have quality
but we have consistency
I mean they had both so
what are you
there goes my video
so speaking of we haven't even talked about
our incoming party
yeah party i mean they're calling it a conference but we'll call it what it is it's a party yep
it's it's a week it's a week-long birthday party for me oh yes that's it's been a while since you
brought that up i've uh i forgot i shame on me for forgetting how could you possibly have forgotten
i've sent you i sent you a calendar invite this week for the bryce birthday i'm sure
he doesn't have to worry about forgetting uh and sure he will be reminded even i don't think that
was this week i think that was previously but so you're you're speaking yeah you're not only
you're going to be there you're going to be speaking yeah what uh give us a little give us
a little give the listener and potentially the listener slash attendee a preview of uh what to expect uh i'm going to talk
about functions so um here's the thing every time for the last like three or multiple years now
every since sean gave his first talk at boost con um which was like the first boost contact
of boost con um there's this whole thing of like pushing value,
you know, what I like to call value-oriented programming
instead of object-oriented programming, right?
Which, whatever that means, but like Sean talks about it,
Dave Abrahams talks about it,
and it's really hard to actually, you know,
describe it and everything. So I'm constantly trying to, I keep telling myself, like, let's do a talk actually describe it and everything.
So I'm constantly trying to, I keep telling myself,
let's do a talk on value-oriented programming.
And we'll just explain to people what value-oriented programming is.
And then more importantly, what's the value in value-oriented programming?
And then I'm like, whenever I start doing that,
all I end up talking about is functions.
So I'm like, screw values. I'm not going to talk about value oriented programming
I'm just going to talk about functions
because I don't know if you ever looked at code before
people don't know how to write functions
it's kind of scary
functions are
I've seen a lot of bad code
in my years
so
correct me if I'm wrong,
but the title of your talk is Value-Oriented Programming.
The title of my talk is Value-Oriented Programming Part 1,
So You Want to Write a Function.
So it's actually a talk about functions.
In the world of value-oriented programming.
Speaking of talk titles,
I need to change my talk title and description
because I'm now doing a different talk at C++, Norah.
Consider this your formal notice, Connor.
All right.
I will update your talk title.
So I guess we don't need to give away the whole talk.
And by we, I mean you, because i'm not the one giving the talk but uh why don't people know how to write
functions i mean why that's a good question that's a separate question i have an answer for but
but what you really what you're what you think you use certain words but that's not what you
meant to ask what you were asking is why do I think people don't know how to write functions?
Well, you just said people don't know how to write functions.
Right.
Do you think people know how to write functions?
Have you looked at code?
How much bad code have you seen in your life?
You're just a young guy.
Definitely not as much as you.
Yeah.
What?
That's what?
You make it sound like I wrote bad code.
No, I've just seen a lot of code in my life yeah i'm guessing you've done a lot more code review
yeah so most code is bad that is just it doesn't matter where i've worked most code is bad um
and one of the it turns out that one of the things is just i asked this question the other day what
is the fundamental building block of programming?
And, you know, you might say classes.
Classes are like objects.
I mean, it depends on who you ask.
Well, the real answer is functions.
Functions is the real answer.
Not much happens without functions.
Classes are just like complicated parameters to functions so so so functions are
the real building block and they don't get used very well um you know how many you know you find
functions that are a million lines long um functions that uh just you know modify their
input parameters instead of taking you know but now the real question you asked, though,
is why are functions so bad or whatever you asked.
And was this even the last time I was talking to you?
Yeah, the last time I was on this without Bryce,
but there was Ben and I, right?
Yep, yep.
I did the lightning talk on complecting
complecting oh yeah yeah yeah yeah that is why and this is to this day this is my my it's my
favorite talk even though it's like a five minute lightning talk um and it's not even that the talk's
good it's that the idea in my head is good um uh complecting made easy every step of the way when we're coding the easy thing to do
makes your code worse right when i need to change you know like you're sitting down you've got a
task to do it's either fix a bug or add a feature you know like that's typically what you're doing
right it's like oh i gotta go in here and change code. And so what you do is add an if statement
wherever you need to add that if statement
and like do some stuff.
And it's like, oh, this is going to fix that problem
and blah, blah, blah, blah.
And you just add some code
just right in the middle of this function.
You're probably in the wrong function
because, but you went to this function
because that's the code you knew.
You didn't know the other code over there very well.
So you started here with the code that you already knew.
You're like, oh, I could fix this from here.
If I just do this, I call this other function,
it gives me the wrong answer,
but if I add 0.5, then it's the right answer.
So I'll add 0.5 or whatever,
which literally happened today.
Because I do computer vision stuff,
and the answer's coming back, it's off by half a pixel
because people don't agree what,
like is zero zero the top corner of the first pixel
or is zero zero the middle of the first pixel?
Right?
It's two different coordinate systems.
So you're off by half a pixel a lot.
So it's just like,
well, if I just add 0.5 right here,
it's going to fix my problem.
Well, it's like,
that's not the right place to add 0.5, but it's the if I just add 0.5 right here, it's going to fix my problem. Well, it's like, that's not the right place to add 0.5.
But it's the easiest place to add 0.5.
So you just do the easiest thing.
And then it's like, should I add a new function for this?
Well, that's harder than just writing the code in this current spot I'm at, right?
Should I put this code in this class here?
Or should I put it in a separate class?
Or should I just put it in a separate,
it's just a free function that should be somewhere.
And then if I tell someone,
oh, make that a free function.
It doesn't have to be a member of the class.
They're like, well, where do I put it?
What CPP file do I put it in?
What header do I put it in?
And it's like, well, make a new header.
Make a new CPP file.
It's like, oh, okay.
But that's hard.
I mean, it's not hard,
but it's harder than not doing it
every step of the way these these little things it's easier to change an existing class than to
like refactor it or separate it or whatever now maybe you always do the right thing maybe you know
you're a good programmer and you're like why why would anyone just do that? You would, of course you would refactor when it needs to be refactored. Or of course you would
write a new CBB file, a new header when, when it's a free function that, you know, is only
partially associated with this class and it shouldn't be in the same header. But no one does
that. Everyone just puts it wherever is easiest. And so many things we do are like that. So why is code bad? Because
complecting is easy. It's the easy path. And good code is the hard path.
That is my biggest insight of my life.
So here's a super specific question in response to that very high level wisdom. I remember at one point in my first job coding in C++ where I had this class and I had basically a function in that class that was only using a single member.
Maybe there was five or six members, but everything else was passed in as a parameter.
And if you've read, I'm sure many people in the C++ community have either read Scott Myers' books.
And I think also there was an article on Dr. Dobbs, which is like way before my time.
Do you want the link?
I have slides with the article.
It's encapsulation.
Free functions improves encapsulation or whatever it's called.
Right.
Yeah, exactly.
And that article is translated into one of the points in one
of Scott's books, but it's basically gives you this hierarchy of sort of the four levels
that you should prefer and you should always prefer non-member, non-friend functions if
possible.
And I remember writing this code initially and then was reading Scott's book at the same
time. And I realized that, oh,
this only, you know, relies on the ID, which was just an integer. Clearly I can move this outside
and just pass the idea and then poof, you're done. But I was so conflicted at the time of doing this
because, um, it was like the, it was like a calculating something from some information,
and you were passing in the table and all this stuff,
and the ID was...
It doesn't really matter,
but the function went with the class.
They were bundled together.
And when you're writing this class,
based on how most C++ IDEs work,
you go write the class, you go dot, poof,
and it gives you the options to select from.
And as soon as you move that outside, even if it's in a namespace, we don't have uniform function
call syntax, and most IDEs aren't going to recommend you. I have heard that in like CLion
for certain algorithms, it does have some amount of recommending of like, oh, you might be able to
use this free function. But I've always been torn because I know specifically that some other languages, like they specifically lean towards
that design of like the friendliness of member functions and just being able to go dot and have
autocomplete. And even though I completely agree with the article and Scott's point that, you know,
that's how encapsulation, that's what it's designed for. I've always been like slightly torn just about the ergonomic, like, you know, the, the experience of programming and
having member functions automatically. And like a part of me thinks that the answer is that, well,
we just, if we had something like you've UFCs and IDEs were designed, it would be the same
experience, but like unified function call syntax uniform um but yeah we don't
we don't have unicorn unicorn yeah it should be called unicorn because we're probably never
going to get it in c plus um that's this is before your time in the committee connor but that that's
exactly the joke oh is it yeah it's it's not it's not a new joke it's uh it's not the first thing
that's been called a unicorn either.
There's other unicorn.
Like unicorn initialization.
I wasn't going to say it, but yeah.
But anyways, interested to get your thoughts.
So, yes, there is a nice ergonomics with member functions, right?
But long-term, it's long-term detrimental to your code base, basically.
That's the problem, right?
Like, how many things can you do with a string?
How many functions can you write with string?
Like, infinite number of functions you could write with a string, right?
They can't all be member functions.
So at some point, you got to draw a line
and say, this is not important to be, you know,
because if it really is, like, the first set of rules are just like, well, do you need
the internal member variables?
Like, if you don't need them, that's a good sign it doesn't need to be a member function,
right?
But it's not the only thing.
As an example, and like on the committee, I argue this sometimes. Back in the
day when we used to have meetings in person, I remember arguing this. Like string has 200 member
functions or something. It's terrible. It's a terrible class. And most of them could have been
algorithms because they don't have to just work on strings. They can work on vectors and other things, right?
And then we introduced starts with, I think,
is one of the recent functions we added to string, right?
It's a member function.
And I argued that it should be a member function.
But that's because the ergonomics are so bad when it's not because if you have a function
it's called starts with and it takes two strings you're like oh which one's like the needle which
one's the haystack right and and it's hard but if it's you know uh haystack dot starts with needle
no one is confused about about what that function does.
Clearly, we just need infix binary function.
Yeah, that could be the answer too, right?
That's what Connor is thinking.
But either way, for every rule out there, there's going to be exceptions,
things to balance out.
The answer in C++ is always, it depends.
But the more member functions, I like to say that classes are made of Velcro.
Classes are made of Velcro.
You continually attach more things to the class.
And then you start attaching functions to the class.
You're like, okay, here's this thing that goes along with the class.
We'll attach it.
And then you attach another function.
And then somewhere down the road, you're like,
oh, this function doesn't really work unless I have this other thing.
Oh, to fix this, I'm going to add another member variable to the class.
Right?
And now your class has gotten bigger.
You didn't just add new functions to it.
You added new, you you know stuff in your class
and a class becomes this nexus point of entanglement where everything goes through this
class right if you change one function or one member variable this class you might have broken
all these functions right because it's all you know they can all touch the internals and you've
got like 200 member functions you have to worry about breaking when you change something and you that's you've you've entangled classes are
points of entanglement unless you're careful about it so that's yeah that's how that's the
other way you complex things is by someone. I had someone.
I can't give away what I, my, my, my interview questions, but I had a question about, you know,
two points and some function you could do on some points.
Tony, it's not like you're on a popular podcast.
You can give away your interview secrets.
Basically it's tune in next week to hear what Tony's interview question podcast. Yeah, yeah. You can give away your interview secrets. Basically,
tune in next week
to hear what
Tony's interview question is.
Thanks for listening.
We hope you enjoyed
and have a great day.