Ep13.5. Why Are There So Many Programming Languages?

In my job I used mostly C++ and Fortran and occasionally ADA and a little bit of shell scripting and once in a while a tiny bit of like said and all those kind of things mm-hmm and something that I’ve always wondered about since my background is not computer science its mechanical engineering and physics and these other things and.

I just kind of pretend to do software development we are all pretending yes why do we have all of these programming languages why does somebody go off and decide I’m.

Going to write a new language is this kind of like the xkcd comic where they say like there’s 14 standards we need one standard to.

Unite them all and then like a long time later they’re like we have 15 standards we need one standard to unite them all and it just always fails or are there specific archetypal goals that people have when they’re writing a language some specific problem or or group of problems they’re trying to solve by creating.

This new language why does this happen so I think you’re second guess is the one I would say is the dominating answer to this the.

Standards argument doesn’t really apply because you don’t really see an effort to make like backwards compatible or interoperable languages like there isn’t some language where it’s like oh yeah you can write code and I don’t know let’s call it Z there’s probably language named Z but whatever no one cares about it so we write we make Z and you can write.

And it’s like garbage collected and thread-safe automatically and you can also just write c and c++ code in it and.

It just runs perfectly like people do not make these languages very frequently there are a few and they’re backwards compatible because they had to be and usually they’re like backwards compatible with c or something they like grew out of it I think Objective C does that C++ does that I can’t think of any others there aren’t very many languages like that and so for the most part each language solves some kind of specific need that the programmers had and then the.

Language is it’s really difficult to do compatibility like if you make a syntactic change to any language then it breaks all the existing source code so you make a language you’re trying to solve specific.

Problems then the language grows out of your control and people use it for all kinds of things in all kinds of domains and their programs creeks under the weight of the language is bad design.

Decisions but there’s no way to fix them and so then someone says I know what we need and then they make a new language but then everyone says well why should I program in that because I’m not backwards compatible I can’t just port my code over and there’s a huge cost to porting it over so then they.

Have to fight really hard for that language to get adoption and mindshare and that’s a really big problem and then once you get people on it then the same problems occur I think there’s some kind of sarcastic quote about this so that’s like there’s only two kinds of programming languages once nobody.

Uses and once everybody hates because if you use it you’re gonna see all the problems but you can’t just write a new language that solves all the problems because no one will use it so what we see is the really slow evolutionary process of trying to make a better language trying to get people to accept.

It it mostly doesn’t work and things don’t move as fast as you would hope because you have to keep waiting for languages to gain acceptance and only then only once they’re.

In widespread usage do you really truly understand the problems and then you can write the successor can you give some examples of recurring types of problems that people are trying.

To solve by creating a new language well for a long time one of the biggest arguments was whether a language should manage your memory for you or not there’s no way for a language to truly manage your memory for you it’s a turing-complete undecidable problem whether memory can be garbage collected or not because in order to understand if the memory can be garbage collected you’d have to know everything the.
Program is ever gonna do in the future.

Which is impossible so some languages do it and some don’t and then people argue about which one is useful for specific domains C and Fortran do not garbage collect I don’t know what EDA does do you have the equivalent of like the new keyword or the delete keyword I never got into ADA that.

The work I’ve done in ADA has been porting ADA to C++ okay and at the same time you were.

Modifying it from procedural to object-oriented okay and so the old ADA code would not have new and is it delete I forget what the corresponding operator is I haven’t.

Programmed any ADA since 2005 I think so I don’t really remember it yeah so that was a big area of contention and so people kept making new languages mainly that were garbage collected and they would get different levels of adoption because people were fleeing from having to manage their own memory and then a lot of programmers who are really good at managing their own memory we’re like I don’t see what the problem is with kids these.

Days I managed my own memory and all my programs are really fast and people were happily writing Java and Python programs that got stuff done.

And then they were dealing with running out of memory later and it also happened to write the cusp of memory got really really cheap and so now machines all have multiple gigs of memory and you know who cares you can just waste tons of it and doesn’t really matter the new problem that’s really like in vogue to solve is thread safety and essentially all computers now our tiny little distributed systems like all processors have multiple cores.

On them that are all trying to communicate with each other or alternatively they’re not trying to communicate and all of your programs just runs on one core that’s really really hot for instance Chrome a very modern web browser basically runs that way it uses one processor a.

Whole lot to render our web page and obviously that’s not really the right approach it’s just that it’s not very feasible to use all of the cores given the way that programming works right now because nobody can understand a program that uses all the cores and so no new language.

Has shown up so so this problem is called rust and rust enforces at compile time which thread owns the ability to write to an object and so it’s super awkward to program in because you have to tell the compiler like this function owns it now ok now this function doesn’t own it I’m releasing this and now.

This other function owns it and things like that and you you feel like you’re having to hold the compilers hand in order to pass a memory or on but it also means that you can’t accidentally double write to something you can’t read from something that’s dirty there’s this whole class of errors that you simply.

Can’t make because the compiler won’t let you do it so it avoids all.

Of these memory race conditions yeah for the most.

Part okay so that’s a really great concept probably rust is implementing it and nearly the worst way but it’s still the best way that anyone has tried so far and so rust is seeing adoption because Mozilla is working on this project they initially codenamed servo which is to try and write a web browser that uses all the cores at once to render the page and do other things this.

Is obviously the right way to write a web browser so we’re probably gonna see this era where Firefox is faster than chrome they’re doing a lot of things and eventually chrome is probably going to have to duplicate this somehow chrome.

And it’s rendering engine blank is written in I believe C++ so I don’t know what they’re gonna do port it to rust probably not try and write thread safe C++ code I don’t know it’s gonna be hard so if Russ turns out to be the right thing probably what we’ll start seeing is people making other languages that are like rust but more friendly.

To write in like if you’re only using one thread you don’t have to write all of the syntax around.

Sharing and borrowing and stuff and that’s kind.

Of how programming language is Marchon but really really slowly do you feel like.

That answers your question I think that was pretty informative because I come at all this with just a very basic knowledge a couple of years of computer science in high school and three in college.

And then I’ve just kind of faked it all the.

Way through my career so a lot of these concepts I’m only passing ly familiar with and the computer science you got.

In high school is with the worst teacher ever oh she was a nice.

Old lady did y’all glue the mouse ball shut No well actually that was someone someone in my ear did that but it wasn’t my class they did it in my year too actually I took it in.

11th grade from her did you take it in 12th we would have been the same year then I don’t remember I’ll have to think about.

It but if you go look online there’s a really good chart of programming language evolution in which one’s copied ideas from each other and you can see that there’s a lot of divergence and then good languages get stuff stolen from them yeah yeah I I feel like because of the industry I work in I’ll probably just keep working and C++ and.

Fortran for the rest of my career I don’t see a lot of push in my industry to have everybody adopt new languages yeah and because so many of the people I work with are like me they’re aerodynamicists they’re mathematicians they have other specialties first and then they learned how to hack out some code and we have a few people who are real computer science majors who are real software.

Developers who really know what they’re doing in that sense and probably not enough to have enough force to get us and customers and everyone else on board with everybody going to some new language there’s just too much momentum given our skill sets yeah we’re not nimble.

Enough one of the other things I feel like I see is you mentioned computer science people who are software developers I think though there’s there’s all these really different fields like computer science isn’t really software development which is not really software engineering and software engineering almost doesn’t exist there are not very many people in the world who are trying to build repeatable consistent strong processes for thinking about how to make software that achieve specific goals it’s mostly ad-hoc and for.

Software development that’s just people who make software but it it doesn’t need to follow any specific standards or anything it just needs to sort of work until they’re told to stop working on it and then computer science is this very.

Abstract sort of math based thing where it’s like given a computing machine what could i compute with it and how many time steps would it take and how many memory units would it take and things like that but not necessarily a lot of consideration for what what if.

You built this machine so like arguably computer science could have been taught in the early.

1800s and they would have just been like one day maybe someone will build a thing that could implement these problems here solving so it’s kind of divorced from actually building anything and you can read about what NASA did to build space shuttle software that was I would argue software engineering and they’re like oh we we write all.

These tests and we have all these meetings and it takes us.

Line of code and all this stuff and I feel like what they’re doing is just sort of really entry-level to writing really.

Good software for mission critical systems like that but it’s pretty uncommon in the industry supposedly people do it for other life-and-death control systems like nuclear reactors and stuff like that but I kind of questioned how much process actually goes into it I don’t know I’m guessing there’s a lot of stuff you guys could do to improve your process a lot and there’s just nobody who has the decision-making knowledge capability.

And authority all in one place to do it.

Posted in Programming<a href="https://baby2471.com/tag/ada" rel="tag">ada</a> <a href="https://baby2471.com/tag/c" rel="tag">c#</a> <a href="https://baby2471.com/tag/fungineering" rel="tag">fungineering</a> <a href="https://baby2471.com/tag/fungineering-podcast" rel="tag">fungineering podcast</a> <a href="https://baby2471.com/tag/golang" rel="tag">golang</a> <a href="https://baby2471.com/tag/javascript" rel="tag">Javascript</a> <a href="https://baby2471.com/tag/podcast" rel="tag">Podcast</a> <a href="https://baby2471.com/tag/programming" rel="tag">programming</a> <a href="https://baby2471.com/tag/programming-languages" rel="tag">programming languages</a> <a href="https://baby2471.com/tag/python" rel="tag">python</a>