From Turbo Pascal to Delphi to C# to TypeScript, an interview with PL legend Anders Hejlsberg

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi there and welcome to context free where we talk about programming languages today I'm excited to welcome guest Anders hilesberg the creator of C sharp and typescript I've been using his products since turbo Pascal in my high school days like usual for my interviews I've edited and found visuals for the interview after the fact anyway let's get started okay so to start with could you please introduce yourself sure I'm Anders heilsberg and I'm a technical fellow at Microsoft awesome so what do you usually do for work these days well these days most of my time I spend on the typescript open source project but then I sort of tend to get involved in a Consulting role on anything that has to do with languages and development Tools around Microsoft basically so I work with the visual studio code guys I work with other teams that you know I meet with Guido man Rossum who's like doing Python and who's now also at Microsoft I meet with mass Torgeson who's doing C sharp and so and with the C plus plus guys you know from time to time and so that sounds great and how did you get started originally in programming languages well that goes back a long a long long time probably 40 years ago well even further actually I was fortunate enough to go to high school that offered students access to a computer and you know this is back in the mid 70s and it was rare for high school students to have access to computers but that's sort of how I got into it and got interested in programming and was fortunate enough to learn Al gal as my first programming language I was always sort of interested in that branch of languages and then when I went to Technical University in Copenhagen I ended up getting involved in a small company that had computer stores in Copenhagen and wrote a whole bunch of software for you know 8-bit micros at the time and that ultimately ended up being turbo Pascal and it was Pascal because I sort of like that family of languages uh because I'd learned alcohol and then very well the rest is history I suppose got involved with the Borland folks then you know basically was part of the Borland startup that's awesome I just want to talk more about Borland real soon but looking at turo Pascal itself is a product I use that in high school that was some of my early experience during computer programming not the only one and it was an amazing product there's a lot of good things to get said about it still is there anything that we've like forgotten about programming or computers since those days that you wish we could bring back oh I'd love to bring back the Simplicity and the sort of enforced scarcity right of those environments I mean when you only have 64k of memory to do good with that you have to leave something over for the user you get you get the really carefully consider every feature you put in the product right because is it really worth those extra that extra 1K that it's gonna take up right and so now it's like computers are like basically black holes of just there's no bottom I mean there's so much capacity and we can fill it by just piling all all sorts of stuff that no one ever asked for right but of course that increases the complexity so they were sort of like an enforced Simplicity in in the old world that I still long for it yes okay awesome so in terms of being at borlands he said you're there pretty much for the startup days what was it like being there how did y'all do the transition say from turo Pascal to Delphi and things like that I mean well being part of it is it's like I consider myself so incredibly fortunate you know to have been at the right place at the right time you know with the right set of skills right I mean was was right there at the beginning of the PC industry well before the PC industry but it all in a sense started with the 8-Bit micros right and then I grew into the PC and that's just been fantastic to be able to ride it all all the way up but but have been there from the beginning and then because it gives you a much deeper understanding of why the world looks the way it looks because you saw the evolution right and you lived it I think Borland was a fantastic adventure for me in several ways I mean there was doing the thing that I love doing for a living you know it was always my hobby in a sense I've never really had a real job and um and then also you know getting to see the world because I basically immigrated from Copenhagen that moved to Silicon Valley which is like what an adventure and so that was fantastic too now you asked two about like how did turbo Pascal become Delphi yeah yeah I'm a bit curious about that how that worked uh-huh uh well I mean we did turbo Pascal for many years um I think the first turbo Pascal ship didn't uh I think 83 and we worked on that even through the early 90s through many versions I think we were up to like turbo Pascal version seven and Borland Pascal version seven which was the sort of professional version as well but of course um some things were happening in the industry at the time in particular the Advent of graphical use or interfaces and sort of all switch from text driven to GUI driven apps and that was a pretty dramatic transition right and originally we had libraries that allowed you to do object Pascal with Windows but there weren't really graphical designers there were you know there weren't all the things that users were coming to expect from these rapid application development environments and in particular a competitor of ours a contemporary competitor was Visual Basic and Visual Basic pioneered in many ways that rad Paradigm but luckily for us at Borland Visual Basic was basic and was not a compiled language and did not have an extensibility model and there were all sorts of things that we could shoot holes in by building a better mousetrap in that category of product and by also you know doing a lot of innovative stuff I think we were one of the first to sort of couple a real programming language with client server and Rapid application education development and whatever on that in a sense cemented a place for Delphi that exists through this day I mean people are still writing apps in Delphi and Delphi shipped in 95 I think so that's quite amazing right that is awesome I've heard I never used Delta myself but I have had some co-workers who used it and they just have great things to say about it yeah it was a fun project it really was and I should mention too it sort of sprang out of a bit of a misfire because after doing all of these versions of Turbo Pascal of course we knew that gooeys were where it was at but of course there was also a whole lot of speculation at the time then well do we really need to program in these like text-based languages why aren't we just like wiring things together why don't we have software ICS that was a very popular buzzword at the time and so we worked for a year or two on a project that was entirely about visually building applications and having software ICS that you've wired together and it was almost like a big like Electronics toolkit but with software components instead and it demoed wonderfully I mean you could build centigrade to fahrenheit converters by having input boxes and an adder and a multiplier and whatever it was beautiful right but but it scaled terribly because once things got more complex you just had boxes and lines going from everywhere to everywhere it ended up being this like complete morass of spaghetti you know and ultimately I think we proved to ourselves that there is something to be said for programming languages and sort of reverted back to that in Delphi well that's awesome I didn't even know about that path that you'd worked on at Borland so that's pretty cool right and then uh in the late 90s you had to transition over to Microsoft right that work for you yeah that was that was in 96 I well at the time I was sort of increasingly becoming this made with the direction or or the lack of direction if you will of Borland you know we were building great development tools but we were not really succeeding in other product categories and ultimately you know he was sort of a if you can't beat him join him uh and a lot of people who had been at Borland had migrated to Microsoft and of course they knew who to then call upon then eventually I was sort of convinced that yes I need to try something different um and came to Microsoft in 96. ostensibly to work on Microsoft's Java development tools because at the time too Java was sort of basically flattening the industry everyone thought that everything was going to be Java and everything else was going to go away and then and it was taken to oil by storm there was even the Java fund the Silicon Valley VC fund whose sole purpose was to invest in companies that broke Java applications didn't matter what the applications did as long as they were in Java that's where we're putting normally now of course history has proven that no programming language is that powerful right it's not really about the language you write in it's about the app that you write but still that was sort of the state of the world when I came to Microsoft of course Very quickly it became evident that it was just meaningless for Microsoft to try to base its software development future on technology that was licensed from a competitor and therefore very quickly we realized that we had to build a platform that was the right platform for our customers to do their work and that worked well with our products and that was sort of the Genesis of.net and c-sharp and the newer generations of Visual Basic and so forth yeah and that makes a lot of sense but as far as C sharp goes and Java goes c-sharp is obviously in some ways a reaction to Java because it sort of fit in the same Paradigm but it had its own unique feature to start with and it's had its own trajectory since then as well so how do you see that sort of relationship well I hesitate to call it a reaction to Java I think it was inspired by job or just like Java was inspired by a bunch of other programming languages and any programming language designer who chooses to ignore history will be punished appropriately so you have to understand what is the Contemporary picture of a products that exist at the time you're in right now I'd say the thing that really drove us to build C sharp was that we observed this tremendous success of Visual Basic and the rapid application development Paradigm our customers loved it right they love building their apps that way but they also loved the power and expressiveness of C plus plus and hated not having that in Visual Basic and so to us it was really like the real thing that we were striving for was to build a language that had the expressiveness and power of C plus plus but with the ease of use of Visual Basic and that's hopefully what we built with c-sharp and its Associated development tools okay awesome and one of the very early features of c-sharp that I still think about all these years later is the struct versus class distinction uh and we've seen that I just sort of repeated in similar Notions in Swift or other languages and to me there's sort of an issue of like you know a class has a behavior struct has data but they both sort of have some overlap there's also like recently there's records in c-sharp as well which are sort of independent from the versus the class distinction but what do you see in that kind of thing how do you think that idea has played out over the years well I mean from the 10 000 foot view structs are purely an optimization there's really no other particularly good reason for them to exist and just to sort of call it out with classes in C sharp it is implied that they are allocate in the garbage collected Heap and that in turn means you know a certain amount of overheads that you're not holding the data of the structure holding a reference or a pointer to the data of the class whereas with a struct it's allocated in line and therefore it can be allocated in a stack frame and therefore it does not incur GC costs and back in the 90s that distinction mattered more than it probably does today it still matters for system level programming languages but it doesn't really matter as much and you see for example in JavaScript there's no notion of One Versus the other and I think that's a good thing because who cares how it's allocated and it doesn't really fundamentally affect the semantics of your program but it does in some ways because the minute you say something is no longer a heap allocated then it also can't have an object identity and that means in turn what does equals then mean well it can't mean that it has the same object identity because it doesn't have an object identity so now you have to go Define that as being value equality and whatever but that's really in a sense more of a follow-on of the optimization than it was a design goal now having value equality can most certainly be useful in a lot of scenarios in particular for immutable data structures like string it's kind of silly to talk about the referential identity of a string who cares what the referential identity you care about the contents of the string and since it can never be modified you know well you might as well just have value semantics and say when you compare two strings you're comparing the characters industry and their length right as opposed to whether they reference the same physical string in memory so value semantics matter in that sense but values of antics can fully be done with allocated data structures so it isn't really per se a thing that you need the structs for so long way of saying that they were largely an optimization and they are also super helpful in interoperability right I mean if you want good interoperability with lower level systems apis and languages like C and C plus plus the instructs are definitely a must okay awesome thank you and you mentioned along the way some comparison between say c-sharp and JavaScript how did you do the transition then from C sharp to typescript how did that work well I worked on C sharp for more than 10 years and you know that's a long time uh and then you know I I sort of got interested actually interestingly through C sharp I got interested in the problem that typescript is solving and the way it happened was that internal teams were coming to us and they were asking whether we could productize a product called Script sharp which was a transpiler that transpiled c-sharp into JavaScript so basically it allows you to author in C sharp and then compile to JavaScript and run it as JavaScript and we were wondering about like why would anyone do that uh well it turns out that if you're coding in C sharp you get grown-up tooling right you get like a real type system you get an IDE that gets you code navigation and statement completion and go to definition and refactorings and all of this stuff you get you get a whole Suite of tools you can run on your code base that are Enterprise scale and for much larger apps and what was happening at the time was teams were starting to write really large JavaScript apps because it become obvious to everybody that JavaScript was actually the real cross-platform language not Java and therefore that's what you had to write it but writing really large apps in JavaScript is very very hard because there is no type system and the tooling for JavaScript was horrible at the time you know and like you try to safely refactor some JavaScript code that is like literally impossible right because all you can do is text search and replace there's no semantic knowledge in your tool set about this property being a different property than that property even though they have the same name right and when you refactor you only want to rename one of them so in a sense what teams were doing was they were choosing to write in a different language just so they could get grown-up tooling and that kind of got me intrigued I go wow is JavaScript really that busted and wouldn't it be better to fix that and wouldn't people be happier to actually have a fixed JavaScript instead of another language you know and that was the Genesis for typescript it was like doing some deep introspection on what is it that is wrong with JavaScript that causes it to not scale to large projects and what can we do to change that and that was the typescript journey that I'm still on very awesome and it's clearly been very successful Journey as well in terms of the adoption rate yes yes and watching languages evolve over the years whether that's say C sharp or type script or many other languages there's sort of a trend toward functional programming and maybe other things as well that you might have noticed but is there anything that surprised you in the evolution of either C sharp or typescript over the years well I mean there's there's the fortunate fact that both of them have seen wide adoption which by by no means is a guarantee when you set out to build a programming language okay as a rule the world needs another programming language like it needs another older man right so you're really pushing rocks uphill when you're designing a new programming language but occasionally you manage to make them stick at the top right and I've been fortunate enough to do that several times now and that has in a sense surprised me and in particular I would say with typescript I had never expected typescript to get the level of penetration that it has seen now where by some metrics now I'm seeing that typescript is more popular than JavaScript I mean it depends on the kind of app you're writing but if you're a professional JavaScript developer chances are that you're more likely to be using typescript than not that I I would have Forsworn you know had you asked me five or ten years ago that that was gonna be possible of course I'm delighted by it and I think the world is better for it it's also been fun because JavaScript like you mentioned functional programming and JavaScript luckily has some very good functional programming bones deeply buried in it you know the notion that functions are first class objects and the notion that you could do closure over outer state in nested functions is tremendously powerful and has deep roots in functional programming languages and so Brenda Nike got that right when he built JavaScript in just three weeks or whatever it was and trying to tease that out has been fun and one of the ways we tease it out in typescript is by having a type system that is heavily influenced by other functional programming languages and has a number of the Marquee features that characterize functional programming languages such as the ability to construct abstract data types for example which you can do with discriminated unions in typescript and you can do exhaustiveness checking and you can do a bunch of fancy things you know that traditional object-oriented programming languages usually don't get YouTube but we also have oop building and we also have structural programming language we have generics and in fact because typescript's type system is touring complete typescripts type system is indeed a pure functional programming language so there are even meta levels of functional programming in typescript if you will I've seen some great hacks people have done with that it's sort of fun yeah it's fun to watch for sure uh going back a little bit to.net one of the things that was supposed to be originally for was a Common Language runtime and there have been many languages built for the CLR over the years yeah these days mostly it's c-sharp F sharp and say Powershell and a lot of the others haven't necessarily gained traction uh do you think there's a reason why there hasn't been more languages for the CLR yeah I think more and more it is really not about the language but rather about the platform right and so when you talk about programming in c-sharp you're not really talking about the c-sharp syntax you're talking about programming in the symbiotic creature created between the.net framework and the c-sharp programming language right and indeed probably most of what you reason about is actually the.net framework or whatever Library you're using in your app and the language is simply the thing that allows you to glue together in all of this functionality and so I think that the language first Viewpoint in that sense is kind of wrong I think you have to sort of view platform first or Affinity first right like JavaScript is affinitized with the web and the web platform uh the front-end platform and and talking about well I mean there are other languages there but they all ultimately compile to JavaScript right and so JavaScript is that language and that was why also for us it was super important to like try to actually fix JavaScript if you will as opposed to build yet another compiled to JavaScript language and you look at C sharp it's affinitized with systems programming you look at SQL interphinitized with databases you look at c-sharp it's a thing and if you try to take a language from its aphenitization Silo and move it on to a different platform you get this odd like creature that isn't really at peace with itself and I think that's why ultimately it isn't really meaningful to talk about some of these other languages on the.net platform I mean python python is like it runs on to see python runtime and that's sort of implied and yes there are python implementations on.net but they don't necessarily run all the code that's out there right they don't run numpy or pandas or whatever and so it's it's it's kind of pointless right okay that makes a lot of sense looking forward what do you see that's most interesting coming in the future in programming languages well there's this whole new phenomenon of artificial intelligence and machine learning applied to programming languages right and these very large language models that now make phenomena like github's co-pilot possible and it's super interesting to see that come into fruition and we're all wondering where is this gonna go I mean to what extent can computers actually reason about your programs uh we're certainly at a very nascent state right now but still that's helpful you know I mean like the notion of this sort of all-knowing thing that knows all the lines of code that anyone ever wrote in open source and can regurgitate them at will is super helpful that's like having you know Mr Know It All sit right next to you and go oh I need a sorting out route okay let me just give it to you right here right because someone already did that now there's still the created part of the process you know that these tools it's not clear that they'll ever get there we don't know and to me that's fascinating right it's fascinating to follow that and be surprised by it uh I was certainly surprised by what I I can understand how but I'm surprised that that models could get that large and incorporate that much of a corpus of with the ability to extrapolate over it even you know is that's impressive right I agree and I have to say also I really don't know how to predict the timeline I have some background on machine learning myself but I don't know the timeline of what's coming when but things definitely are happening yeah yeah lots of stuff okay awesome thank you for your time today uh do you have any closing words well I don't know keep on coding I would say it's amazing how far programming languages have come in the 40 years that I've been doing it but also amazing how much they're the same right and I'm fascinated by that you know that there's really like just like mathematics or whatever there's a thing there that has a lot of staying power on I I think programming for a good long time to come will still be a worthwhile and Noble exercise yeah okay awesome thank you so much for your time today it's been great talking to you you're welcome thank you
Info
Channel: Context Free
Views: 43,733
Rating: undefined out of 5
Keywords: programming, programming languages, typescript, c#, csharp, turbo pascal, turbopascal, borland, microsoft, dotnet, .net, delphi, java, machine learning, github copilot, visual studio code, j++, vscode, c++, cpp, cpplang, c plus plus, visual basic, vb, vb.net, javascript, js, software
Id: 6udlQakSXZY
Channel Id: undefined
Length: 24min 42sec (1482 seconds)
Published: Tue Oct 11 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.