Well, so the archaeology part is not necessarily like just the observation that this is surprising, but but the question of why is this the case, right? Why are bitwise operations lower precedents than relational operations, right? And so I did some archaeology. You know, I looked back, and usually when we're talking about C, usually we have to look back to the languages B and B C P L.
ConorWelcome to AD SP The Podcast, episode 282, recorded on March 30th, 2026. My name is Connor, and today with my co-host Ben, we chat about programming language archaeology, semantics, and more.
BenI want to go back to talking about something you mentioned earlier, which is programming language archaeology, which is fascinating. Right? Not just from the point of view of like algorithmic and functional influences, but I think just from the point of view of like syntax, actually. Like how you know, we say things like, oh, it's a C style syntax language, and everyone kind of knows what that means, right? But there's tons of little things that go into that. Somebody in my meetup asked the other day, you know, what's and this perennial this perennial sort of stumbling block, which is why are the the bitwise operators such low precedence?
ConorBitwise meaning like the single pipe in C versus the double.
BenYeah, the single ampersand for and single pipe for bitwise or and XOR is the carrot, right? Well and those are, I think I'm right in saying, lower precedents than relational operators in C and in C ⁇ . That sounds right. And and that is surprising to most people when they first when they first meet it, certainly I think it's surprising, and it is sort of a continual seems like a wart in the language, right? It seems like a stumbling block that you always have to parens around but because you think of bitwise being very low level, you might think of it being binding very tightly as an operation, right?
ConorI guess. I mean I honestly the way that I use those are typically when they're being overloaded. Like 100%. The uh the most often I've used one of those is in ranges because they overload that. But every once in a while, I guess I used to at a certain point of time do the you know checking for odd and even kind of thing, but then compilers now optimize to that anyways, right? So you can just do mod two and you can be pretty confident that it's gonna convert to the bitwise version.
BenYou don't need to pull the bit bit tricks for those kind of simple things. Strength reduction has been a thing in optimizing compilers for decades.
ConorBut I mean you would you use this stuff, I imagine, much, much more than than I do. So I guess yeah, I'll I'll take your word that it's surprising.
BenWell, so the archaeology part is not necessarily like just the observation that this is surprising, but but the question of why is this the case, right? Why are bitwise operations lower precedents than relational operations, right? And so to answer that question, now I I should say that I don't know the you know, this is not fact what I'm about to say, but this is plausible based on what I've looked into, right? And so I did some archaeology, you know. I look back, and usually when we're talking about C ⁇ , usually we have to look back to the languages B and B CPL. And I think in those languages, I think in BCPL and in languages of that time, bitwise operations were not represented in the language, typically. Because remember, this was before this was before types as we know them today. This was before machines with 8 bits or 16 bits or power of 2 bits. There were a lot of sort of 36-bit machines in that time. And uh this these were languages which treated, in the case of BCPL, I think, memory cells as it acted on memory cells, right? It was not the idea of an int or a float. There was here's your memory cell, it's got data in it. That's your one type sort of thing. And so these languages had arithmetic operations, they had Boolean operations, but they hadn't yet distinguished between Boolean operations and bitwise operations. Okay. Right? There was no distinction between double ampersand for a Boolean and and single ampersand for a bitwise and. Because back in those days it was the same thing, pretty much. And so I think it's even the case that in the early days yes, I think I was reading in the early days of C, C didn't have bitwise operations. They were introduced, I mean, fairly early on in C's lifetime at this point, but still not absolutely originally. You know, it's something that needed to be sort of discovered and added into the language. And and when they were added, they were naturally thought of as just the same as the Boolean operations, and so they got the same precedence. Again, I don't know any of this to be fact, but this seems to me to be plausible. But I love I love looking back at this sort of thing and and you know, looking back at little syntactic elements like that. A lot of things happened with B, because BCPL was fairly, you know, again, the computing hardware at that time was different than today. You you didn't have home computers, right? They were different even than in the 80s. You didn't have home computers, you didn't have 8-bit computers. No, you had university installations, you had you had uh military installations, you had various computers that were given to you on a on a on a lease basis, right? You had mainframes and things like that. And at the time of B and C coming along, the world was just starting to move into sort of smaller computers, if you like. Just starting to move away from big industrial installations where you just lease the computer from IBM or whatever and move more towards, oh, actually now the comp now the university can afford to buy its own mini computer or whatever, the you know, the PDP-10, the PDP-11, things like that. And it was starting to get new hardware, like the PDP-11, I think it was, had new hardware to deal with floating point. That is the origin of types, or one origin of types in C. Right? If you're writing a language to support this hardware, well now the hardware has integer instructions and floating point instructions. And so you need different types. You need to have an int and the float type so that your compiler knows which instruction to output. And going from BCPL to B was a massive, massive sort of cutdown. Ken Thompson had to trim every corner he knew how to in order to fit B into the machine. Right? I think he had uh sort of 16k or something, which is incredible to think about today, right? You have 16k to write the compiler. But that's the reason, for example, we have equals for assignment and equals equals for comparison. Ken Thompson, I think, wrote that. So he had to have two different operators. And he wrote, I think, that in an average program, assignment is about twice as frequent as comparison. And so an operator half the size makes sense. It's sort of this mindset of having to save every byte of space you possibly can, and so having to make decisions like that. Yeah, that stuff. I never thought about that. And it's also the reason why we have you know initialization being the same thing as assignment. You know, using the equal sign for both, which is a very they are two different different fundamental operations, right? And and Yeah, yeah.
ConorAnd there are languages like Smalltalk, you know, is has two different many array languages. They have two different symbols for they call them assignment and change. Yeah. That stuff is very curious. I mean, we we have the same. We're we're two people that both have the uh Gene Samet uh History of Programming Languages book, which I don't know.
BenYeah, that was even earlier, of course. That that that book finishes at 1969, I think.
ConorYeah, yeah. And I actually, for some reason, I thought APL only got a small mention, but there's a whole section on APL. I I I don't know why at one point, because I remember first flipping through it when I got it, and I was like, what? I can't believe this. But that was a later on I realized that was a mistake. I mean, this makes me think of you mentioned, or at least at some point have brought up the Kajori volumes of the history of mathematical notation. Oh yeah. Yeah. And I I forgot to- There's a couple things that I was gonna mention since the last time we chatted. One of them is that I discovered upon our last conversation that in Iverson's notation as a tool of thought Turing Award paper, he mentions Kajori in the final section of the paper. And I I can't remember if we were talking about it, about you know the Pedmas. I yeah, we were we were talking about it. We were sure. Now the thing is, this is probably the fourth time I've talked about it since then, because on my other array language podcasts I I I've been bringing it up, is that Iverson actually comments, and it's it's documented in a couple different places, that the reason for Pedmas, the motivation for it, is for a concise representation of polynomials. Right. And that you can and I never really noticed this is that you omit the multiplication in when you're writing polynomials, right? Coefficients go next to variable names.
BenYou just write 2x or 3x or whatever it is. You don't write 2 times x.
ConorAnd but the the reason that Iverson brought up Kajori is that he it's not really a criticism, but he says, you know, Kajori doesn't actually make much mention of parentheses in in the it's mostly just about the evolution of primitives. And the reason I bring this all up is one, because we were talking about it before, but when you were saying the equal and double equals, you know, my APL brain is like, well, you know, really the arrow character is nicer in a sense for assignment, and then you can reserve the equal and the not equal to, which we uh left pointing arrow. Yeah, left-pointing arrow. Yeah, some languages do that, do that one point initialization or for assignments. But then that made me think is like, how do we end up with the keyboards that we ended up with? You know, like we were missing so much stuff. Like we don't have a multiplication, like how do we end up with a keyboard that doesn't have like four of the most common binary operations, yet we ended up with like at and you know, it just anyways, and so like I guess we have asterisk for multiply, which we've co-opted.
BenWe have yeah, and this is yeah, I mean, even like I think we were mentioning this last time, or mentioned it in passing. Like, computers are fundamentally the interfaces to computers we've we've known for these last fifty years, have been sort of stuck in one dimension. You know, the terminal is a one-dimensional input-output. You get the line, right? When you're typing stuff, it's on a line. You don't really, and this is true of most certainly mainstream programming languages today, like it's lines. It's not the second dimension is is not something we get to use. So we don't write fractions, right? We when we do division, we have the slash. Yeah. Which is kind of a way of shoehorning division onto one line.
ConorYou don't get to just naturally write a fraction. Yeah. I mean, uh someone was commenting that that you know the division sign is actually rarely used because you know people use the slash or they use the way that you write a fraction. Yeah. But it's like my thought is like, well, that's because it's not on the keyboard. If we if we had put it on the keyboard, you know, but I guess when people maybe that that's like the history of the keyboard, is that initially when it was designed it was for writing, it wasn't for mathematics and programming. Yeah, maybe.
BenUm And so now we're now we're stuck with these strange glyphs that mean some of them mean things only because they've meant they've had to mean that in the computer age, right? Division itself, you know, back in the 1800s, I think it was common to use a colon for division, right? Which persists today in the sense of a ratio. You write down a ratio, use a colon, right? That is historically the symbol for division, right? Because a ratio is a division. And then we have things like, you know, percent sign for mod, which as far as I can tell, it's it's used because we had to use something, and and that's probably only been I don't know which language introduced a percent sign for modulus operation, but it it can't be much before 1970, I'm thinking.
ConorYeah, interestingly. Is that is that the case? Does J does J use the percent sign for for division? It might. Give me a second, I can check. 1% 2 is 0.5, yeah. So the J language uses it for division because arguably it looks closer to the division symbol than the slash does. Yeah.
BenYeah.
ConorUh it's such a bad place we've ended up, in my opinion. You know, shocking that the ATL programmer thinks that the the symbols, but you know, like the double asterisk for expen exponentiation, you know, and and I think there's some languages that actually use the caret for exponentiation, but it's just like and you know, the not equal to like But even that is strange, right?
BenIt's it's sort of like you just you'd write superscript if you were writing it down with a pencil. Yeah. You wouldn't use a carrot to indicate ordinary exponentiation.
ConorYeah. I that none of it makes sense. I mean my favorite is the the disagreement or the uh proliferation of not equal to operators. Because that's that one probably has the most uh uh non-uniformity. You know, most languages do exclamation equal. Some do slash equal. Certainly c syntax.
BenIs that C?
ConorIs that where it comes from?
BenYeah, slash equal. Well, I I don't know. Again, it's probably in B. It might be in BCPL. I don't know. I'd have to look it up. But most things, most things in C don't come from C originally. They come from B or maybe BCPL. But like I said, moving from BCPF B CPL to B was a massive cut-down job. So a lot of syntax, small syntax elements got changed at that point.
ConorBut yeah, some languages they use the diamonds, you know, less than, greater than greater than Haskell uses slash equal to, which, you know, arguably might be better because if you if you over strike those two symbols, you end up with, you know, a not equal to. And I know there's like there's like four other ones of and some languages even have multiple operators for not equal to, you know, it's it's just like And not equal to is of course the same thing as XOR if you're talking about Booleans.
BenOh yeah. Right? So And that's why that's that's maybe why I see and languages derived from it don't have like you have bitwise and or XOR, you have logical and an OR, but no logical XOR. But logical XOR is not equal to.
ConorRight. Yeah, there's there's some cute APL expressions that make use of that fact. Anyways, it is I I do agree that doing these little arc archaeology things and and you know finding where the names of things come from and syntactic curiosities. That's what I I've I've that came out of that Pedmas discussion and the follow-up discussions that I had that you weren't there for was that I have to I have to internalize Chesterson's fence because I've always given PedMass a hard time. And I think it was in my conversation with you where I said, you know, oh maybe I should go and figure out, you know, you know, if was there a reason? And that that was I was talking with Adam, panelist on a raycast, about the the word arbitrary, and that you know, we kind of throw that around too loosely, and it's like uh and then we actually got into a debate about the definition of the word arbitrary. He was saying that it is, you know, if it's due to personal preference, that actually is arbitrary. And I I preferred the random or on a whim definition, but a lot of the things that Okay, well it's definitely not random. Random is wrong. Random is right out there. Random is not well, because what if you look up the definition of arbitrary, one of them is random or on a whim.
BenUm so wait, were you saying that that well since you brought this up, arbitrary means it was arbitrated, right? And so it was a decision was made, and that that's all that arbitrary means, I think.
ConorJesus English is way too complicated. You're saying arbitrary define.
BenIs there another one that says it it can't I suppose it carries a side meaning of like disinterested, right? Because a judge, one who arbitrates, is supposed to be disinterested. Supposed to not have an interest in the outcome. And so, in that sense, arbitrary jibes with that.
ConorOkay, so according to Merriam Webster, we've got three different definitions. The first one, chosen, decided, etc., seemingly at random or on a win rather than in a reasoned or methodical way. Two, not restrained or limited in the exercise of power. Okay. And then there's a third one which is the it says law next to it, and it says depending on individual discretion, per parentheses as of a judge, and parentheses, and not fixed by law. Do any of those match the arbitrator?
BenOkay, that makes sense. Yeah, that third one matches arbitrating. So depending on depending on the the wishes of a judge, of an arbitrator.
ConorDiscretion. What does discretion mean now? The quality of having or showing discernment. This is what I've decided too that LLMs have done, you know? Now that now that we got these things doing our work for us, or some of us, now I spend all these times ask answering philosophical questions of what did I really mean when I asked the LLM to do something, and now I'm spending all this time looking up the precise meaning of these words.
BenWell, yeah. In general we have to be careful there. I mean, as much as I just made the argument that arbitrar for the meaning of arbitrary, we do need to be careful in in uh reductive etymology, let's say. Because that's not really how English works, is it?
ConorYes. I mean uh famously the word liter literal no longer just means literal because everybody uses it not in the literal sense. And so now it has two definite definitions, one of which is essentially not literally. Figurative.
BenOne is figurative, yeah.
ConorArbitrate means to settle the disputes.
BenYes. We can because there are any number of words in everyday life which have completely become disconnected from their original etymologies and and the meaning now is completely different.
ConorSo well to so then for in your s in in your mind, arbitrary But etymology is a is a sort of side project of my sense. Well, I mean I uh one of my favorite quotes of all time uh is from Kevin Henney, who in one of his talks mentions, you know, the phrase which I always took issue with, and he's the only person that I've ever heard mention it, is you know, it's just semantics. And he's like, What are you talking about? That's all there is is semantics. If we can't agree on semantics, we're we're just talking around in circles. And I've always thought the same thing. It's like if we can't agree on what the words mean, you know, it's like the classic you get in an argument and then someone says, you know, well, you know what I meant. It's like, well, clearly I didn't, because we wouldn't be having this disagreement if I knew what you meant. Anyway, so where are we now? We're disc the word arbitrary, you in your in your mind doesn't necessarily Well, I offered one potential idea of it.
BenIf you said to me something is arbitrary, I I would I normally would distinguish between arbitrary and random. That's one thing I would do. Random has a mathematical meaning. Random means decided by chance, right? Arbitrary means simply chosen, arbitrated in some way. Not the same thing to me. Okay, yeah, so we well, I mean, so Mary Ma although in in loose usage people say random all the time to mean arbitrary. And I get that.
ConorYeah, yeah. I mean, well, this uh this is honestly like I don't know, maybe the listener does not care at all, but I I find this so fascinating fascinating that like what is actually the definition, like the you know, should we what should we agree when What we're talking about here is like, you know, I thought that PedMass didn't have good motivating reasons for being the like Ah right now. So that's a nice thing. So really what I was saying is that like there's no good there can't be a good reason for why they chose this because clearly like the APL model of order of operations is linear, it's simpler, it's better. And so when I when I would call PedMass arbitrary, I'm essentially trying to say is like there can't be a good motivating reason. So you meant capricious. Capricious. Alright, well, here we go, folks. The limits you meant arbitrary capricious rather than arbitrary reasoned. Governed by governed or characterized by sudden, irrational, or unpredictable impulses or whims. Not so or in the second division, not supported by the weight of evidence or established rules of law. Capricious.
BenYou thought it was on a whim. You thought somebody just liked it. I thought that You didn't think there was reasoning behind it.
ConorI thought, I don't know if I necessarily thought it was on a whim, even though that was, you know, the first definition of arbitrary, but that there clearly wasn't a good motivation, you know, like for the definition for some definition of the word good. But that's why in that conversation we had last time, I literally said, maybe I should go and try and figure out, was there actually like odds are even if it was you know maybe bad reasoning then or bad reasoning now, it might have been good reasoning at the time. Maybe it still is good reasoning. And and you can argue whether you know expression of polynomials is good reasoning. But the point being is is someone thought like put thought and care into making the decision, we should not at all use the word arbitrary. There might be some other word that is like you disagree with the motivation or reasoning. I see. So I'm not sure. Is there is there an adjective or a word for that kind of I don't know.
BenWell, and a lot of things are reasonable at the time. Famously in programming. And the and the reasons that apply at any given time do not necessarily apply 40, 50 years later. Yes. Yeah. I mean that's the uh So his for historical reasons, you know, we say. We say it's like that for historical reasons.
ConorSo we gotta look up a word. So there's there's arbitrary, which you know, we got we got so many definitions for I I I I just I don't never gonna use that word again. Just random. Maybe I should start saying uh aliatory instead of random. Alleatory. Gee, my goodness, man.
BenSupposedly I play Scrabble. What is a A-L-E-A-A-T-O-O-Y. From from the Latin alia, a die or yes dice.
ConorEverybody knows the Latin ali. Depending on an uncertain event or contingency as to both profit and loss, or relating to luck and especially to bad luck.
BenSo if random now means arbitrary, alleatory, maybe now is a good word for random. True, true, truly random. Decided by the roll of a dice.
ConorWell, my my evolving thought now is that anytime we use the word arbitrary, specifically when you know, a lot of the conversations I have are programming related or design related. Arbitrary is never actually the word I think that we're really I mean, I guess if you unless if you're using it. I mean, that's the thing is to go back to Kevlin Henney's, it's just semantics. It's just like I had a definition for arbitrary, Adam had a definition for arbitrary, you had a definition for arbitrary, and they're all I wouldn't even say subtly different, they're all just, you know, one is like, oh, it's my personal preference, I thought it was kind of random, and you thought it was no, it's just a decision being made.
BenYeah. They're all they're all related, sure. But they all have different shades of meaning. But that is, you know, that's one of the great things about English is that shades of meaning, you know, English has synonyms, which many languages to a first approximation don't have, right? And synonyms in English can draw shades of meaning. And it's still a problem for us.
ConorYeah. It's funny because when I was editing that episode and I mentioned Orwell in 1984 in their reduced vocabulary, and I was like, I I mentioned, well, and I've I've matured and I know that it's a beautiful. When I was editing it, I was like, do I really is that actually true? Like, not the maturing part, but just there's a part of my brain that really does think that there's something nice about a regular communication language that doesn't that doesn't have the subtle differences, you know, you know. I for poetry it's great for for communicating like quickly and we're all on the same page, as we have seen here with the definition of the word arbitrary. What is my pot the the the code report cinematic you know podcast universe has just evolved to talking about the the definition of the word arbitrary.
BenI look forward to your next podcast, your new podcast on uh language and the meanings in in in mathematical communication.
ConorI mean I've got too many podcasts. That I mean I you know I can just I can repurpose the algorithms podcast for uh I mean there's there's something to be said about talking about programming language, archaeology, and then also etymology.
BenIt's it's one in the well if we want to bring it back to algorithms, you know. Let's talk about the algorithm algorithmic description in place. That has a very specific meaning to algorithms, right? If we say that an algorithm is in place, the It and it is that the meaning is not what most people think of. Most people programming C ⁇ would not would think of an in an algorithm being in place and it has a has a certain meaning to them, right? It means it doesn't use extra space. But when it comes to actually tying down what that means, that's where the that's where the definition has to be made in algor in in mathematical algorithm land, right? Because you can't just say it doesn't use extra space, because every algorithm uses extra space in some way. Like you need a stack frame to run it, you need a counter variable, which necessarily is sort of the the logarithmic number of bits of the size of the of the collection, right? So you are using in some sense, in a very pure sense, you are using some kind of extra space. But so the in the definition of in an in-place algorithm is an algorithm which only uses, I think it's polylog extra space. Polylog. And and I don't remember I don't remember the exact meaning of polylog, but polylogarithmic. In other words, what I just said, like like you you can't use it it's sort of intuitive that if you have an algorithm which works in place on an array, you're not going to have a second array that it needs for working space, right? Of the same size. But you are going to have counter variables. You are going to have sort of a sort of constant space extra, right? And more than that, you're going to have a logarithmic space extra because counter variables measured in bits I mean measuring in bits is logarithmic. Right. Right. Right. You do have a logarithmic number of bits required to represent the size of your collection, like I said. So, you know, there are specific definitions of these terms, like in place. In place is the one that springs to mind.
ConorI mean that's that's nice, you know? Having a precise, you know, it's it's kind of like the the specification of an algorithm in where it says, I feel like we're missing that, for better or for worse, in English.
BenWell, you know, now we're back to like does it matter to most people most of the time? No. It doesn't matter. Like, it's fine to have this intuitive understanding of what in place means. We know it's not going to allocate extra space. We know it's going to be able to run on the array we have, fine. Right? We don't need to think most of the time about you know the precise amount of extra space it's going to use in bits in a stack frame. Right? We we we that we subordinate that unnecessary detail for a a different abstraction. Right? We're happy with the idea that an in-place algorithm, yeah, I can use a counter variable, why wouldn't I be able to do that? Like we don't give it a second thought in everyday programming. And that's fine.
ConorYeah, I guess the question is is when does it matter? And probably when you start talking about, you know, the for lack of a better word, standardies, you know, the of an algorithm spec, or more importantly, uh compiler specification or whatever. Then you end up in these conversations where it's it's much more important to be precise and be on the same page about what a word means, right? Yes. Like we don't have any fuzzy language around linear, linear rhythmic, quadratic. Like that is that means the same thing to everyone, right? But when you start talking about the word readable or arbitrary, now we're now we're in much more of like subjectivity land. Someone mentioned there was a guest we should have on that has done studies about program language design and has conducted like studies on what makes something more learnable or readable. And yeah, we should maybe reach out to that individual. That would be interesting. Anyways, we've blown by. I mean, we were chatting before, but uh As usual. Part for the course. But this has been great, as always. Yeah, maybe we will try to, whether it's that guest or a different guest, start bringing on some guests because the feedback from the end of year kind of wrap-up was everybody loves this content, but they also love hearing from people at different companies and whether it's on programming language stuff or you know, whatever their area of expertise is. Be sure to check these show notes either in your podcast app or at adspthepodcast.com for links to anything we mentioned in today's episode, as well as a link to a GitHub discussion where you can leave thoughts, comments, and questions. Thanks for listening. We hope you enjoyed and have a great day. I am the anti price. Um