We had a course in second year where we we learnt ADA and we wrote this we we had this big huge class project. And that was the only ADA, but th there was no compiler at the time. It was too early. Wait. But when you say there's no compiler, do you mean you just didn't run the code? No, you couldn't the the compiler that we had access to in New York University did not actually produce uh machine code. It just said this it's it was like the first stage of a compiler. It had no back end. It had no code generation. Uh so you could own you only knew that your code was syntactically and I guess semantically correct.
ConorWelcome to ADSP the podcast, episode 154, recorded on October 18th, 2023. My name is Connor, and today with my co-host Bryce, we continue part three of our four-part conversation with Jonathan O'Connor. On today's episode, we continue our comparison of Pascom vs C vs Ada and go on to talk about a plethora of other programming languages. Zig, NIM, Carbon, Eiffel, WiWon, Clojure are all languages that get mentioned in this episode.
BryceSo I don't know that we I don't know that we bottomed out on talking about ADA.
ConorOh yeah, no, wait. So I mean we're hopping all over the place. I was, while you were explaining the power of visualization in paper, uh, because at one point we had, so we're even rewinding more uh back from Ada. We'll get back to Ada in a sec. I was trying to figure out what the internet has to say of why C won out over Pascal. And so the summary, first of all, Pascal is actually older than C. I did not know that. Uh C, according to Wikipedia's first year of appearance was 1972, and Pascal's was 1970. And the general opinion of the internet, there are many different hot takes, but the most popular one is that Pascal was designed to be a language for teaching. And C was designed to be a language for doing systems programming and getting things done. And what that meant is that as a teaching language, C isn't great because you got many foot guns, you can you can make many mistakes as a beginner, but that's the kind of power you want when you're trying to write a system. Whereas Pascal did not have those foot guns, but it kind of made things more difficult. Well, I mean, one of the top things that came across answers was that uh Pascal, I'm not sure if this changed with all future versions of Pascal, but at one point, all of your code had to be in a single source file, which does sound pretty crazy. I'm not sure if you recall uh Jonathan, if that was the case when you were using Pascal.
Jonathan O'ConnorThat that might have been the case, but I would I would have thought you could just type, you just say, you know, Pascal or whatever PC or whatever was the thing was, and the list of files, I guess, to compile all of them into one group. But yeah, but maybe that's true because I think that was the big thing with Ada. Um because Ada uh started they had this notion of packages, that was one of their big selling points. It was for large application development, um with large teams, and you could have uh you have a package um specification and a package body. So you had the split from between declaration and and uh implementation, um and that was huge, and you could you could come, I mean that's what we spent most of our time doing was just writing package specifications rather than implementations, um uh in that project that we did. Um, but yeah, you had the huge thing about packages, and packages could have they had they were like um namespaces. They're they're similar to namespaces except in C, except you can also uh I guess no, they're not like classes, but you can you had functions, procedures, um, and you could uh have data inside them. So you could have what's the difference between a function and a procedure in uh function a function has all uh input parameters and it returns a value. And procedures can have input and output, and I don't think they have any no, they don't they don't have any um uh return value. But yeah, you could I mean I I that's from what I remember ADA didn't have object orientation built into it. Uh you had a package, you could create like a a global variable inside the package that was private to the package, and you could kind of refer to things in that you could you could hand out private uh you could hand out these what was it called limited something or other, um where you you'd have they were just like handles um to something and and people outside the package couldn't do anything with them uh except pass them around. Um and uh that way you could you could you could set up stacks and whatever, but um, there was no kind of you couldn't there was no such thing as a class.
ConorUm, I also just looked up, so Ada was created in 1980, so that's a decade, roughly a decade after both uh Pascal and C. And it says right in the first line on the Wikipedia page that it was primarily inspired by Pascal, but that uh it was I didn't actually know this. It was it was uh created by a guy at Honeywell, whose name I'm gonna mess up. Jean French computers.
Jonathan O'ConnorYeah, what's his name?
ConorJean Jean Ickb?
Jonathan O'ConnorYeah, I think so. Probably that's something else, but uh but that's how I pronounce it as well.
ConorAnd it was uh I guess so a French computer scientist, Honeywell, famously, an American company though, and they were contracted by the US DOD, Department of Defense, to create this language, ADA, specifically to replace a whole bunch of languages that the DoD was using at the time. And it also has this little byline in strong typing, we trust. So it's clearly this, you know, uh government-funded for government purposes language.
Jonathan O'ConnorThat's one of the things that that Ada has that C still doesn't. Um it had strong typedefs. So you could you could create um my it, you could say using my int equals int, say, and that would be you can't you can't uh do arithmetic between ints and my ints. They're totally separate and they don't go together. So that's something that we don't have in C still.
ConorInteresting. So it's a type alias that does not interrupt with the underlying type.
Jonathan O'ConnorCorrect, correct. Interesting.
ConorAnd then I assume that Ada has some facility for you know casting or static casting.
Jonathan O'ConnorUh there probably was, but you'd probably yeah, there must have been some some way of casting to the underlying uh low-level integer. And the other thing you could do, you could you just had integer and you had float. But you could specify that your integer had to have a range from like zero to one billion or something like that, and that would and the the compiler would figure out how many bytes to use for its integer type.
ConorAnd so that actually, so I that was one of the things that I did know about Ada is that it has bounded and fixed point, so it has a richer type system for your integer types that you might want. And I was perusing through ADSP, the Virth book, looking at a couple examples, and it looks like they actually had the same similar syntax for that kind of stuff. Oh, maybe, maybe, yeah. Type keyword, and it said type uh digit uh and then zero.9. So my guess is that is defining uh like an integer type. I could be wrong about that, but combining this with the fact that Ada was uh you know inspired by Pascal, I wouldn't be surprised if Pascal is another example of a language that has, I'm not sure about the fixed point type, but the the bounded integer types. Um and and speaking of Pascal again, that was the other thing the internet said is that C is not really known to have killed Pascal. It was actually Java because what Pascal was good at, and it was what the domain that it was successful in was being taught in universities. It was a teaching language, and so that's where it kind of thrived. And then when Java came out in the 1990s and there was a huge marketing blitz, a ton of universities switched from whatever language they were using, uh, you know, insert a language, and a lot of those might have been Pascal, and then Java became the one of the de facto uh teaching languages up until when I was in university, you know, in 2008. The first, well, I think it was the second course. The first course taught Python, and the second course taught uh Java. So interesting that, you know, C and Pascal, even though they were quote unquote contemporaries, it's at least the internet doesn't think that it was, it wasn't the success of C that like killed Pascal. It was more that it was a great teaching language, but then uh that was surpassed by something else.
Jonathan O'ConnorBut I think I think maybe C also because it was used as the the system language for for all these Unix systems, and those Unix systems started getting very popular, and uh it became a a language that you'd you know you'd write code on on uh PCs. Um so I think yeah, just you could as you said you could get things done with C. Whereas uh and then it it you know you had Microsoft producing compiler, although they did they also have a Pascal compiler? I mean Turbo Pascal was the big thing in the in the late 80s, early 90s, and that had a nice IDE, it was very, very fast uh to compile um and build. So that was that was kind of uh really nice to use.
ConorYeah. I mean that that was definitely uh something that came up in in the answers, was that the fact that Unix was written in C and it shipped with, I think, the C compiler. Yeah. Um not only did that have a huge impact on you know educational institutions that were getting Unix computers, um, but also a ton of folks that were at Bell or other places that had experience with Unix, when they went to go do their own companies, it was a uh very easy choice to build their whatever you know hardware or software they were building on top of Unix, which you know C becomes a very good option and because it's it's there and it's it's if you're doing stuff that interopts with uh the OS. Uh yeah. Interesting. So that that brings us back to ADA. So ADA is this government-funded, you know, language designed for the government.
Jonathan O'ConnorMilitary standard 1858 is the official the original thing, MIL STD 1858. It was a military standard for for the Department of Defense in America. And they chose 1858, which because I think that was Ada Lovelace's date of birth or date of death. Um interesting.
ConorSo it's just a random four-digit number.
Jonathan O'ConnorIt's not it's not like it's not a random four-digit number. No, no, no, it isn't.
ConorUm the next number in like a sequence of you know paper numbers, like for the ISO uh sequence. I don't believe it.
Jonathan O'ConnorI don't believe it. No, don't believe it was interesting.
ConorUm so did you do any ADA programming when you were in in school?
Jonathan O'ConnorOr yeah, I for for we had a course in second year where we we learnt ADA and we wrote this we we had this big huge class project. And that was the only ADA, but there was no compiler at the time. It was too early. That the they there was this Wait. But when you say there's no compiler, do you mean you just didn't run the code? No, you couldn't the the compiler that we had access to in New York University did not actually produce uh machine code. It just said this it's it was like the first stage of a compiler. It had no back end, it had no code generation. Uh so you could own you only knew that your code was syntactically and I guess semantically correct.
ConorSo wait, so what ch what causes a yeah, how how what causes a a professor or a university to teach a langu teach a course in a language that doesn't have a work a full end-to-end working compiler?
Jonathan O'ConnorUh I I think it's probably um an experiment. I suspect it was an experiment.
ConorThat is like uh I'm not sure. Is that the equivalent of like a university? I mean, I guess it was government funded, so they knew that at some point there was going to be ADA jobs.
Jonathan O'ConnorBut uh I mean it sounds like a university choosing carbon as like we're gonna teach uh and you know, carbon has an interpreter, you can you can you know write some code in it, but I mean the other thing though, Connor, was that it it like in this in the 70s, if you look, if you look at the the PhDs, the the PhD thesis of people who did computer science uh in the 1970s, you'd find a huge number of them have got their PhD by creating a language to investigate some some aspect of of computer science. Um and so there were there were hundreds, if not yeah, definitely maybe even thousands of languages created in the 70s, and that kept on that kept on for another few years, and then it kind of people stopped creating languages, I think, and and you know, the from the 90s I think didn't have that many languages created. There were a few big ones, and now we seem to after maybe like 10-15 years of of no new languages, now suddenly we're getting a whole lot of new languages like Zig and NIM and as well as the C ones, carbon.
ConorWeewa?
Jonathan O'ConnorAnd we wah, wee wah, yes.
ConorThe funnest language to say. Um I wonder if there's a graph. I wonder what I wonder what causes these. I mean, clearly in the 70s, software engineering, computer science, it's it's a a burgeoning, you know, uh, what do you call it? Emerging field. And there's a ton of research topics. Um But then what caused you know the 90s to to be, what do they call it, a nadir? Um a trough, if you will?
Jonathan O'ConnorProbably people started trying to make money out of you know, by writing applications that actual people want to use. So it went it went from it went from the you know, the laboratory or or from academia to to into into the the real world. Well I'm going to insult somebody there, but um That's alright.
ConorWe're we love maybe I'll maybe I'll insert the uh what is it the the the hot take or spicy take uh K-pop song?
Jonathan O'ConnorBut but yeah, I think I think that's what happened and you had and so we had I mean there was Turbo Pascal, there was there was C ⁇ was getting was big. There was Eiffel briefly. I remember going to a conference in Germany, a one-day conference in Germany with um who was this guy who who headed Eiffel, who created Eiffel, a French guy, very clever man.
ConorUm I feel like I would know the name. I know it was the language of contracts.
Jonathan O'ConnorUm it had a terrific book. He had a terrific book. Um it was oh yes, uh Bertrand Meyer and poor old Bertrand, he absolutely he f found it so hard to to to uh to have to accept that C ⁇ was the more ex more popular language. He found that very hard to take because he just saw all the inadequacies uh and uh of C ⁇ where his his language Eiffel was beautiful and it and it is a beautiful language. Um and he had a lovely he had a lovely standard library, he had he had all sorts of very clever ideas on on data structures and you know the uh how they were what was common about them, and and uh I thought yeah, I thought he it was it was excellent. But um yeah, Eiffel was another language that seems to have come and gone.
ConorUm Yeah, what is Bjarna's uh I mean whether you disagree or agree with uh his takes over time, he has that one quote is there's uh two types of languages, languages that people complain about and languages that people don't use. Which I mean is uh there's definitely some truth in that.
Jonathan O'ConnorUh yeah, I mean there's there's so many like Ada I know has got much bigger. I mean the the I'm yeah, this is the Ada reference manual. You can only see it's it's like a centimeter thick, this part, that the the s second half of this book. And that so it's only about a hundred a hundred and twenty pages long or so. And I noticed um there I got I downloaded um the C sharp standard. Uh there was a link that was sent out on on that I get um and it I looked at it, it was 400 pages long. Um and of course, what C is 2,000 pages long, the standard. Yeah. Hold my beer. Um so I I think yeah, the the languages were much smaller then and and they are not anymore.
ConorUm it's I think it's so I mean I love thinking about I've watched a couple different talks. Richard Feldman, uh fellow podcaster now of Software Unscripted, he has a really popular talk called Why Isn't Functional Programming the Norm? And that talk talks about like what what is it that actually makes a language popular is successful. And just recently I watched a talk from uh James Gosling, famously the creator of Java. And he was talking at an online conference in 2022 called Re-Closure. So it was a closure event. And for those of you that don't know, Clojure is a uh a Lisp that runs on the JVM, so it's kind of in the Java family of languages, similar to Scala and Kotlin. And he was talking about at one point in the talk, you know, what is it that, the same thing, what is it that makes a language successful? And, you know, how much of it is familiarity and and trying to meet developers, you know, where they're at, because there's a lot of great novel ideas that exist in these kind of unique languages, but if it's if it's too different or feels too foreign, it people are repelled from it. You know, I I think APL is a, you know, although APL had its heyday in the 60s and 70s, but you know, these days you make videos and and people just are kind of shocked by it. But I think there's like an a more nuanced question to be asked, is like, I think the things that made languages popular in the 70s and 80s is now different than what makes a language popular today. Because back in the 70s and and 80s, you had less history and existing code to compete with. And now, in order for like a language to compete in the C space, you know, you're competing with the whole infrastructure and ecosystem, as Bryce mentioned in the most recent episode. There's millions, if not billions, of lines of code that represents like you know, technology and effort and value that you know has to go get displaced if you know you if that's your goal, if you're you know, whether it's Rust or whatever. And so the question is, you know, like overall, what is it that makes a language successful? But then also too, like what is it that makes us a language successful today? Like, is it you know, I I don't have the answer to the question. I mean, Jonathan, you've you've been in the industry a lot longer than we have, and you've worked with you know C, Lisp, uh, Ada, Pascal, Ruby, Java. Like, do you have thoughts or you know?
Jonathan O'ConnorI don't know what makes a language popular. I do know that most of us want to use a single language. Uh and uh rather than multiple languages. We want to use we want to we want to have a single hammer and because we look at everything as a nail. And and so you see things like I I don't understand the I why people want to use things like uh React in the JavaScript world where they they that you have use JavaScript to generate HTML and and CSS for web pages. Like there are three languages there JavaScript for for dynamic dynamism, HTML for static structure, and and CSS for for like making it pretty and styling. And they all those languages do their job very well. But there are now JavaScript frameworks where you do everything in JavaScript. And I I and that's an example, like and and in the C world we prefer we like well in any programming world we like to say we want to use the same language. Look at look at um what's that that um WebAssom where you can Oh yeah, WebAssembly. You can you can you can write C code and it runs in your browser. And people tend or or the uh Node.js where the both the server and the front end, the the browser, are running JavaScript. That's another example of having a single tool. And maybe it's maybe it's just that you know these languages have grown, they're quite big, it takes some time quite some time to to understand them and learn them, and therefore you want to use them everywhere because you don't want you don't have time or or it costs too much to train people in in another language.
ConorSo well so here's a related question. What made you uh when you switched languages, was that just a what do you call it, a a byproduct of switching to a new role and it was like a it was a necessity for what you were doing? Or like because at what you went from C to Java to Ruby, and I you actually did explain why you went from Java to Ruby. That was someone patted you on the shoulder and said, maybe check out this thing called Ruby, might make your life simpler. But then you went back to C. Like, were there you know reasons uh you know that you you I think what Connor is really asking is what makes a rational man go from C to Java?
Jonathan O'ConnorWell at the time, actually, actually there, Bryce, I can tell you, I can tell you something. Like when I moved uh to to Java in 2001, Java had reflection. You could you could I win, I win. Shots fired, shots fired.
Bryce90s era C was was pretty pretty rough.
Jonathan O'ConnorYeah, um but um I yeah, I don't uh the there were there you can see in language like Ruby was really popular in in from about 2005, maybe to to when I stopped using it in 2016. Um but you could see that people who were the the top people in Ruby they had decided that it got too popular and they wanted to move on to the next new fresh thing. And so th they chose a lot of them chose elixir in in the Ruby community. And um I think uh Elixir, well that again people say they want they don't want to um to have to man to to maintain their old code and so by changing languages they don't have to.
ConorI mean uh I've never heard that one before, but that is I mean, that's a good uh that is a solution to a problem that you don't want to solve.
Jonathan O'ConnorYeah, you don't want to you don't want to have to look at your old code, so you switch languages and then you get to write new code. Uh and maybe you're solving similar problems that you solved before in a different language, so you have a a better idea of how to solve them, and the new language gives you other interesting characters.
BryceThat reminds me of the of the um the K-language guy who would just every couple years just write a new version and then just delete that. It's a tragedy.
ConorAs time goes on, it's uh the the immensity of the tragedy of what he is doing. Like, don't get me wrong, one of the smartest people I've ever met in my life. The guy is is clearly you know a genius. And um, you know, there's uh some joke on the internet, it's you know Arthur Whitney was blessed by the coding gods, but you know, his curse with the the abilities that he was given is that you know, the languages he created and the code he wrote was you know in unreadable by by most people. And uh I just think it's such a shame that he hits the delete button because he effectively, I don't think intentionally, but like is destroying the history and the community. I mean, I've said this a couple times, like the the K programmers. If you ask them as a group, like what what version, or not version, because they're different languages, but if I want to go learn K, what do I go learn? K4, K6, K7? And you'll get a different answer. And uh there's different documentations for each one. And it imagin it would be like the equivalent of like, imagine all the different Lisps were created by one person, you know, this this godlike you know entity. And every time, you know, the individual went from you know Lisp to Common Lisp to Scheme to Guile to Racket to Clojure, and every single time he just hit the delete button, didn't didn't you know explain reasoning or anything, and you you we just have to follow it and like keep this history in your head. Like, luckily, we got to talk to John Ernest on a ray cast, and he sort of gave an oral history of all the different Ks and what are the major differences in the in the K languages. But yeah, it's it is it's a it's a a mass. I hope he I hope he has a change of heart, you know, and uh he goes on a podcast or gives a talk at some and and gives the the history and you know why did he make the decision from K2 to K3 to to change the data model or something like that? Uh because I think there's a lot of genius in in his work and it's it's it's not even getting lost to the annals of time. It's getting lost because he's he's hitting the delete key.
BryceLike he is actively You do you now do you think he's you think he's got a a backup?
ConorOr you think he actually I believe him 100% that he actually like wipes it from his computer. And like I most I think John Ernest, when we talked to him, he said that he actually locally has a bunch of the different uh K languages as Arthur was working on them. Um but he can't even release them because they're under copyright. And uh and so like the versions of K that exist on the internet are versions that people have reverse engineered. Like there's there's two different K6s, uh one's by John and one's by another individual. One's like written in JavaScript and the other one in another language, I think maybe C. And there's a couple other different K variants, but like they are all basically people that had a executable of K, whether they got it from Arthur or someone else, or they just had the documentation and they reverse engineered the behavior, which is like that's that's crazy. Like, isn't that crazy? That's crazy to think that like the the dialects or the versions that exist of you know K4, K6 or whatever, um or or K3, even, which I know that there's a couple companies that have licenses to K3. Uh that like that's that's the history. Like you know, people might say, oh, Lisp is way bigger than than just the the the different uh K languages. Uh but like I I don't know. I think there is there is some analogy there that like imagine you know you know uh you know someone was hitting the delete key on on different different uh Lisp's. Anyways, that was that was a tangent there.
Jonathan O'ConnorUh I I have a question for the two of you. I mean C is multi-paradig paradigmatic language in that it supports procedural, object-oriented, functional coding styles. Um we have languages like Prologue, which is uh logic-based uh style. We've got um, I guess, well, you've um well you've got what is PPL, BQN, array logic, yeah. Okay, array, array, array, small talk is object-oriented. And we now have these quantum languages. Uh so have we found um all the programming paradigms that are possible?
BryceUm no, and I because I think the the next programming paradigm that's likely being invented today is the um LLMs. The the AI-assisted programming paradigm. Like I how how do we program in a world where programming is really uh giving a prompt to some AI that goes and does the task for you or writes the code for you. Um and like that's the that's that's I think c clearly the whole the field of prompt engineering and what it's leading to is going to lead to new programming paradigms.
ConorI agree. It sounds crazy, but like literally someone when I we were having a research discussion at NVIDIA made that comment. Like, imagine uh like your new layer on your stack is like you are committing to your to your Git repository your prompts. And then the immediate reaction is like, well, you know, that's not deterministic, blah, blah, blah. But like think about all the different layers of the compiler stack from like the different IRs all the way down to assembly. And it's like, how much I mean, there are definitely uh assembly generation experts out there, but like me personally, how much do I actually understand about what a C compiler is doing at the end of the day? Like there, like stuff Bryce knows a lot more about like instruction level parallelism and the way that they're like reorienting your program to do something. And uh, I mean, half the time, I think most of the time it's it's deterministic, but there are times where like you end up, you know, uh it's it's rearranging the way that you would expect it to be done, but it's it's for the benefit because you know you use you typed something, but it knows, oh, when you're doing some, you know, testing whether a number is even. Most people don't use the bitwise, you know, and one or whatever. Uh, but you can you can get the compiler to recognize that stuff anyway.
BryceSo it's it's I don't think it's that far of a fetch to any any limit like any limitation on the that uh exists and seems to be written in stone today for large language models or AI, um take with a huge grain of salt because it's it's a nascent field and it's an evolving fi it's an evolving field. Like, yeah, is the is the lack of determinism that you get out of large language model like a problem for doing things production scale? Yes, but that's a restriction that I don't think will always be around. You know, if you look at large language models today, like they're not they're not very practical. Um like cost-wise, uh uh latency-wise, bandwidth-wise, they're not they're not the most practical or most efficient tool, but uh as as the field matures um and as it becomes more commoditized, um, it'll become more practical and will overcome a lot of those problems.
ConorWhile you were saying that, Bryce, I was thinking of like the original cell phone that you see in like the the wall, what is it uh there's a movie called Wall Street uh with Michael something. And anyways, they've got these like huge things, and it's like you know, only the people that had you know oodles of money could afford these these quote unquote cell phones. But it's like if you saw that and said, Oh, that's gonna be the future, everyone's gonna have one, it's gonna completely change the way we go about our lives, you'd probably be like, Yeah, probably not. But like that wasn't that wasn't what cell phones went on to be, right? And there's a few different iterations. They had the flip phones and then the smartphones were, you know, the the iPhone was a complete, you know, game changer. And uh, you know, expect I expect that that's what the next 20 years is gonna be like. You know, there's gonna be a couple of these big innovations.
Jonathan O'ConnorAnd is that it's that not just a different way of okay, I suppose it is a different way of writing program. Whereas I'm thinking of the programmy paradigms as as being oh, I suppose it yes, actually paradigms are really a way of thinking, isn't it? It's it's so if you're writing a prompt, that's thinking. Okay, fair enough.
BryceAnd I mean quant quantum, you know, the the the paradigms for quantum programming are also very nascent. I would say that that's a new thing, and there may be other things like quantum in the future, you know.
ConorBe sure to check the 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 the GitHub discussion where you can leave comments, thoughts, and questions. Thanks for listening. We hope you enjoyed and have a great day.
BryceLow quality, high quality, that is the tagline of our podcast.
ConorThat's not the tagline. Our tagline is chaos with sprinkles of information.