4 ms·
They mention only in passing arguably the most interesting and currently important language, not least due to its frantic evolutionary pace - Javascript. And on
by somewhereoutth 4y ago
They 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.