capr / blag

:suspect: Blog/wiki of a grumpy old programmer
4 stars 0 forks source link

History of programming languages #11

Open capr opened 3 years ago

capr commented 3 years ago

[DRAFT]

Here's some random facts (until I remember enough of them to put them in some kind of coherent order):

Delphi, C#, TypeScript

Anders Hejlsberg, the co-creator of Turbo Pascal and Delphi, gets $1 million in 1996 to leave Borland and join Microsoft and create C# which is basically a Delphi clone.

He later goes on to create TypeScript and no wonder -- if you haven't liberated yourself from the straitjacket of static types early enough in your career, you'll end up trying to make the whole world statically typed instead.

JavaScript

JavaScript, one of the most misunderstood languages in use today (even by its current maintainers, ironically enough), was created by Brendan Eich in 1995. He went to Netscape with the idea of embedding Scheme in the browser so the result was a language with value semantics, full closures with (limited) lexical scoping, hash maps and prototype-based inheritance (an idea he got from Self).

The reason it's called JavaScript is because Java was getting very popular at a time, mainly as a result of Sun's marketing machine, and Netscape wanted to get a piece of that, so they slapped in curly braces and a bunch of keywords to "make it look like Java", even though the semantics of the language couldn't be more different.

These days every language is trying to be more like Java as a response to the commoditization of programming in recent years, which is why later versions of the language got a lot of useless features like const and the class keyword (among some good ones like full lexical scoping and... well, that).

This stackoverflow answer is a funny way of showing how JavaScript caught up to Lua over the years.

Java

Java's designers were consciously designing a product for people not as smart as them[1]. Ah, just go read Paul Graham's take on it, it's good writing.

[1] http://www.paulgraham.com/javacover.html [2] http://www.paulgraham.com/trevrejavcov.html

Go

Take it from the authror's mouth:

The key point here is that our programmers are not researchers. They are, as a rule, very young, they come to us after their studies, perhaps they studied Java, C / C ++ or Python. They can’t understand an outstanding language, but at the same time we want them to create good software. That is why their language should be easy for them to understand and learn. -- Rob Pike.

Make of that what you wish. What I make of it is that the designers made a great language cut-to-measure for a particular use case: large teams of young programmers crunching on I/O-bound code, a use-case that requires static typing (young programmers / large number of them), coroutines (no need to protect memory when multiplexing I/O), garbage collection (no need to manage memory at all). TBH you can hardly do any better for this particular use-case. The problems only start when you try to step outside of it.