Andy, you posed the question, macros, are they a superpower, a necessary evil, or a mistake? And I said, I don't understand the question.
So you're going to have to explain to me, first of all, what is a macro? Okay, so a macro is
a general term for something you can do within a programming language that lets you step outside of that programming language.
So you might need to do something repetitive, where you're going to end up writing the same bit of code, but slightly different 10 times.
And then some languages provide you this thing called a macro that means instead of that, you can say, do this 10 times, and it will effectively generate code for you.
One way of thinking about it is that it generates code.
Yeah, it's kind of like a programming language within a programming language.
And...
Exactly like Andy said, it's usually useful if you have some like syntactical or like type level thing where you want to run a program on the source code of your program and do some sort of changes to it.
But what's interesting here is there's a bunch of different ways in which you can go about this.
And all the various languages provide either different types of support or none at all.
And so that's where it gets interesting is macros themselves are both like very powerful programs.
They can also be extremely evil and they can also be everything in between, I guess.
Like the way that Andy posed the question is the answer to it would be like, yes, they are all of those things or can be all of those things.
So what I'm getting from this is that it's like a more complicated version of find and replace.
Like say, for example, I've got a load of bash scripts that relate to backups and they've all got a host name or an IP address in there and I want to find and replace it all.
I can do that in a text editor really easily.
But is it that kind of principle, but just much more complicated? I mean, it is that kind of principle,
but it's more like if you wrote a bash script to produce all of those bash scripts.
Right.
You never look at the produced bash scripts.
You only look at the original bash script.
And if you need to make an update to all of them, you just make it once in that original bash script and they all get automatically updated.
The interesting part here is that you may need to do that find and replace across a bunch of different places.
And it kind of just generates the same thing over and over and over with whatever input you gave it.
Andy, you posed the question, macros, are they a superpower, a necessary evil, or a mistake? And I said, I don't understand the question.
So you're going to have to explain to me, first of all, what is a macro? Okay, so a macro is
a general term for something you can do within a programming language that lets you step outside of that programming language.
So you might need to do something repetitive, where you're going to end up writing the same bit of code, but slightly different 10 times.
And then some languages provide you this thing called a macro that means instead of that, you can say, do this 10 times, and it will effectively generate code for you.
One way of thinking about it is that it generates code.
Yeah, it's kind of like a programming language within a programming language.
And...
Exactly like Andy said, it's usually useful if you have some like syntactical or like type level thing where you want to run a program on the source code of your program and do some sort of changes to it.
But what's interesting here is there's a bunch of different ways in which you can go about this.
And all the various languages provide either different types of support or none at all.
And so that's where it gets interesting is macros themselves are both like very powerful programs.
They can also be extremely evil and they can also be everything in between, I guess.
Like the way that Andy posed the question is the answer to it would be like, yes, they are all of those things or can be all of those things.
So what I'm getting from this is that it's like a more complicated version of find and replace.
Like say, for example, I've got a load of bash scripts that relate to backups and they've all got a host name or an IP address in there and I want to find and replace it all.
I can do that in a text editor really easily.
But is it that kind of principle, but just much more complicated? I mean, it is that kind of principle,
but it's more like if you wrote a bash script to produce all of those bash scripts.
Right.
You never look at the produced bash scripts.
You only look at the original bash script.
And if you need to make an update to all of them, you just make it once in that original bash script and they all get automatically updated.
The interesting part here is that you may need to do that find and replace across a bunch of different places.
And it kind of just generates the same thing over and over and over with whatever input you gave it.
The rest of this transcript — segmented and speaker-labeled, so you land on the exact moment something was said
Search every transcript — by keyword, by phrase, or by meaning, across every show Radar indexes
Trends — what is surging across podcasts, measured against its own baseline
Alerts — when a name you follow appears in a newly indexed episode
No account is needed to search Radar.