4 ms·
Alan Perlis and the evolution of programming languages
- chaosprint 4y agoThese are very good points.
- somewhereoutth 4y agoThey mention only in passing arguably the most interesting and currently important language, not least due to its frantic evolutionary pace - Javascript. And only then via TypeScript, which may or may not be an improvement to the underlying language. They do link to their own page on Javascript, but that page is more a side swipe than a considered analysis: https://deprogrammaticaipsum.com/innovationscript/ https://deprogrammaticaipsum.com/innovationscript/ Software language theorists should (hold their nose and) take a very close look at Javascript.
- Y_Y 4y agoOk, I'm piqued. Can someone point to a resource that shows modern JavaScript in a way that would be palatable to snobs like me who think that Scheme is height of fashion and Haskell would be better if only it had a fancier compiler.
- somewhereoutth 4y agoNo resource to hand to show you, but one starting point may be how it has pushed functional programming 'to the masses'. The => operator makes it so easy to drop in a callback or whatever.
- wtetzner 4y agoFunctional programming is about programming with pure functions, not lambdas. Lambdas are obviously very convenient in functional languages, but I think having access to high-quality immutable data structure implementations is more important for pushing a functional style of programming.
- somewhereoutth 4y agoThe convenience means that they actually get used, which in turn enables us to see what they are good for / not so good for, and what abstractions might be useful e.g. Promises.
- wtetzner 4y agoI don't disagree that the convenience is useful, I guess I'm just saying that it's not specific to functional programming.
- lolinder 4y agoJavaScript is most programers' first introduction to map, filter, and reduce. Easy lambdas made those higher-order functions a staple of a lot of JS code. Meanwhile, immutable.js[0] is at 10 million downloads per week and rising. I would add that it's not just the ease of use of lambdas, but the fact that in JavaScript functions really are first class citizens. Most of the other widely used languages have closures added in as a bit of a hack and only treat some functions as real values. [0] https://www.npmjs.com/package/immutable https://www.npmjs.com/package/immutable
- chubot 4y agoSICP in JavaScript, by Abelson and Sussman (2022) https://mitpress.mit.edu/9780262543231/structure-and-interpretation-of-computer-programs/ https://mitpress.mit.edu/9780262543231/structure-and-interpr... :)
- goto11 4y agoJavascript is an a weird place where some people denigrate it beyond reason and others elevate it beyond reason. It does have some warts due to early design mistakes, mostly related to type coercion and semicolon insertion. A linter can protect against that. Among its supporters, much is made of the fact that Eich initially wanted to do scheme in the browser. But JavaScript does not have code-as-data which to me is the defining quality of Lisp/Scheme. It does have lexical scope and closures, but any mainstream language has this these days. It has prototypal inheritance which is mostly notable because it is different from the more common class based inheritance, not because it is particular good in its own right.
- somewhereoutth 4y ago> code-as-data which I consider to be the defining problem of Lisp/Scheme. It becomes impossible to reason about code if it gets used too much or indeed at all. Note that the lambda calculus has no such feature (though of course you could build an LC interpreter in LC)
- lispm 4y agoBut then Lisp is a family of general purpose programming languages and lambda calculus is not.
- somewhereoutth 4y agoLisp is also proffered as being foundational in some sense. I would argue that the LC is a better foundation.
- mncharity 4y ago> [Javascript] has prototypal inheritance which is mostly notable because it is different from the more common class based inheritance, not because it is particular good in its own right. With a caveat that browsers implemented a rather crippled version of it. Much goodness of prototypical inheritance comes from most everything being an object - as with smalltalk. Regrettably browser implementations chose to half-ass this. How many types does browser js have? A few primitives, and Objects, ... and great many implementation types poorly pretending to be Objects, backed with code which accepts only the implementation type and chokes on real objects. They repeatedly implemented a fast path and stopped there, ignoring the general case. Imagine how poorly smalltalk would work if similarly compromised. Browsers have gotten less bad in this respect in recent years, but far too late for the community to learn prototype style programming from js.
- mbrodersen 4y agoJavaScript is objectively one of the most successful programming languages ever invented. That alone makes it worthy of studying. In the same way that it is worth studying why super successful ancient languages like C and C++ are still used today by millions of programmers. With new C/C++ projects being started every single day. Despite the looooong list of complaints and weird design decisions and foot guns and security issues etc. etc. And let me also (tongue-in-cheek) question your sense of fashion: Haskell is so last year compared with leading edge dependently typed languages like Idris. And Scheme is the language your grand-grand-dad was taught at uni and never used in production. Not exactly what I would call “fashionable” :)
- wtetzner 4y agoThe reason for JavaScript being so successful though is not really that interesting.
- uticus 4y ago> They are generally featuring the “industry” moniker, usually easier to understand by masses of engineers... I'm glad the importance of how programming languages enable humans to interact with each other is mentioned. Programming in isolation is a fantasy, and one driver of change is undoubtedly how well humans can interact with other humans' code. Until we can write in our personal language of choice and compile - then have a teammate decompile, edit in their personal language of choice, and recompile with no issues - we have to use a language (or features built on a language, like tests) that allows clear conveyance of ideas. We can't choose languages based on efficiency or beauty solely.
- lolinder 4y agoEven then, we'll still need to use the same language as our colleagues. Can you imagine the headache of trying to have a conversation about the code if each programmer is looking at a different translation of the algorithm?
- garyclarke27 4y ago>> (c) From any two existing languages a third can usually be created which (i) contains the facilities of both in an integrated form, and (it) requires a grammar and evaluation rules less complicated than the collective grammar and evaluation rules of both. << I wish this would happen for to for HTML, CSS, Javascript and SQL It would be fantastic to have 1 language that is declarative and functional in nature that could elegantly define UI and Logic and Database interaction - with Tables as a native data structure.
- ModernMech 4y ago> They are praised on Hacker News and adopted by the community as welcome improvements over existing languages... Carbon (for C++, maybe?) I don't understand why people are taking Carbon so seriously at this stage. Isn't it just a spec and some design docs at this point? And already people are putting it in the running as a better C++? Is this just because it's from Google or are the design docs really that great?
- mbrodersen 4y agoYes it is only because it is from somebody working at Google. If the same person/team released it while not working for Google nobody would care. The fetishisation of anything Google never fails to amuse me. Especially given the long and growing list of failed Google projects.