11 ms·
Why study programming languages (2022)
- keyle 1y agoI tries to answer the question "Why do we design new programming languages?" but it forgets the simplest of answers: Because we can. Because a compiler is nothing more than a fancy text translator.
- WalterBright 1y agoBecause what we know about programming has progressed, and new languages appear to take advantage of that.
- pjmlp 1y agoMany new languages are still recycling ideas from the 1970's research labs. Outside affine types, all the praise for Rust's type system traces back to Standard ML from 1976. The heretic of doing systems programming in GC enabled programming languages (GC in the CS sense, including RC), goes back to research at Xerox PARC, DEC and ETHZ, late 1970's, early 1980's. Other things that we know, like dependent types, effects, formal proofs, capabilities, linear and affine type systems, are equally a few decades old from 1980's, early 1990's. Unfortunely while we have progressed, it seems easier to sell stuff like ChatGPT than better ways to approach software development.
- eptcyka 1y agoAside from bringing in the groundbreaking feature, Rust doesn't bring in any groundbreaking changes. It could be argued that bringing in lesser known features to more people is a good thing in it's own right.
- 1718627440 1y agoIt seams like most things boil down to ideas from the 70's. The internet, distributed computing, AI, etc...
- pjmlp 1y agoIndeed, everything old is new again.
- Rochus 1y ago> most things boil down to ideas from the 70's Rather from the sixties. E.g. OOP including dynamic dispatch, late binding, GC etc. appeared 1967 with Simula.
- pjmlp 1y agoGC was a bit earlier. :)
- Rochus 1y agoEarlier than the sixties? All elements of OOP were known before 1967, but their combination, which we still use today under the title OOP, appeared in Simula 67 for the first time. I think the first appearance of a GC in literature was in 1960.
- AnimalMuppet 1y agoDid Lisp have GC from the beginning? If so, that would be 1958.
- Rochus 1y agoI think, the first mark‑and‑sweep collector was published in McCarthy's 1960 Communications of the ACM paper "Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I". It's resonable to assume, that they already had it when Steve Russell implemented the first Lisp evaluator, but we don't know exactly when it was added.
- kragen 1y agoNo, that paper doesn't describe the garbage collector. I do think it is true that before it was published Slug Russell had implemented the GC, but I think it's correct that we don't have listings from that early. Edit: yes, yes it does describe the garbage collector.
- keyle 1y agoHey Walter, while we have you. Have you ever had the itch to make a newer D that takes all the fancy constructs while retaining the good parts?
- WalterBright 1y agoWe're doing just that by introducing an "Editions" feature that will streamline the feature set.
- pjmlp 1y agoReally fancy one, when it gets to what translation actually means in implementation effort.
- agumonkey 1y agolinguistic constructs will direct your brain when solving problems and may help you discover solutions spaces you wouldn't with another set of idioms not to promote FP but imperative stateful vs closures/function oriented is quite a strong example of that a different paradigm can really be a massive intellectual tool
- TomasBM 1y agoI'm not a 'native' programmer, but even I can agree with that. As it became easier to abstract away from pure assembly, people did just that. Some ideas stuck, some converged, and the ones with the most tenacious, adaptable and attractive communities remained. Before I learned to code, no programming language was even remotely readable to me. But the more I learned, the more I could shed the notion that this was purely my fault, and accept that sometimes things are a certain way because someone found it interesting or useful. Applies to natural languages and mathematics, too.
- ModernMech 1y agoBecause we can, because it's fun, and because some of us are compulsively obsessed.
- awesome_dude 1y agoI think that one of the things that they neglect to mention, on why we invent new languages, and it's probably the most important thing - people want new ways to express concepts. It's super important because those concepts get measured, and absorbed into existing languages (as best they can), but that wouldn't have happened without the new languages New concepts like Rust's "ownership model", Smalltalk's "Object Orientation", Lisp's "Functional programming", Haskell's "Lazy evaluation", Java's "Green threads"
- DarkNova6 1y agoI don't think we have a lack of concepts, but a lack of concept connectivity. To avoid feature bloat of unconnected pieces of ad-hoc syntax Java does the right thing and focuses on expressing easily-composable language building blocks. As a last adopter language, Java has the luxory of cherry-picking good features of other languages but I think their line of thinking should be the reference moving forward.
- mrheosuper 1y agoI'm pretty sure they mentioned >we create programming languages to experience new ideas; ideas that would have remained inaccessible had we stayed with the old languages.
- pjmlp 1y agoWhile those languages made the concepts mainstream, they weren't the ones coming up with them. Rust's "ownership model", is a simplification of Cyclone, AT&T's research on a better C, based on mix of affine and linear type systems. https://en.wikipedia.org/wiki/Cyclone_(programming_language) https://en.wikipedia.org/wiki/Cyclone_(programming_language) Haskell's "Lazy evaluation" was present in Miranda, before all related researchers came up with Haskell as common playground. https://en.wikipedia.org/wiki/Miranda_(programming_language) https://en.wikipedia.org/wiki/Miranda_(programming_language) "History of Haskell" https://www.microsoft.com/en-us/research/wp-content/uploads/2016/07/history.pdf https://www.microsoft.com/en-us/research/wp-content/uploads/... Java's "Green threads" go back to systems like Concurrent Pascal. https://dl.acm.org/doi/10.1145/775332.775335 https://dl.acm.org/doi/10.1145/775332.775335
- cole-k 1y agoRelated: https://cs.wellesley.edu/~cs251/f16/assignments/antics/StefixHanenbergLanguageWars.pdf https://cs.wellesley.edu/~cs251/f16/assignments/antics/Stefi...
- hinkley 1y agoOnce you understand a thing, you know what it’s capable of. A lot of my early expertise in performance analysis was heavily informed by my SIGPLAN membership. Many of the improvements showing up in compilers and interpreters would show up in some form there, and of course those developers were either involved in the papers or had access to the same research. So when some new version came out with a big explanation of what it did, I already had a reasonably good notion of how it worked. It was a dark day when they got rid of the paper proceedings.
- DarkNova6 1y agoThere absolutely lies value in studying programming language, but maybe not when reinventing ideas of the past. > I encourage everyone to create the most absurd, implausible, and impractical languages. Chasing the measurable is often useful, expressing the expressible is insightful, but never forget the true goal of language design: to explore and create what isn’t. Sorry, but this sounds more like an artsclass to me. Don't get me wrong, there was a point in time where exploration of the unknown was the only way to move forward. But these days we would need greater insights into higher-level language semantics and inherent tradeoffs to guide language-design and language evolution. There is plenty to choose from and one can learn already so much just by reading up on the Java-EG mailing lists. Brian Goetz has a true academic mindset and I frequently feel inspired when I read his reasoning which is both highly structured and accessible. Otherwise we would just be left with another compiler class. Compiler basics really aren't that difficult.
- cmontella 1y ago> this sounds more like an artsclass to me. Indeed, it is, and that's the point! Being interfaces to computers for humans, programming languages sit at the intersection of computer science and humanities. Lots of people like to treat programming languages like they're math class, but that's only half the picture. The other half is usability, ergonomics, learnability, and especially community. Not to mention the form of the language is all about aesthetics. How many times has someone on Hacker News called a language "beautiful" or "ugly" referring to the way it looks? When people praise Python they talk about how easy it is to read and how pleasant it is to look at compared to C++. Or look at what people say about Elm error messages versus C++ template errors. Actually a lot of what's wrong with C++ could have been averted if the designers had paid more attention in art class. > But these days we would need greater insights into higher-level language semantics and inherent tradeoffs to guide language-design and language evolution. Here's a talk that argues there's much more fertile languages ground for ideas outside of the "programming languages are math" area, which has been thoroughly strip-mined for decades: https://medium.com/bits-and-behavior/my-splash-2016-keynote-81cc802f5f6e https://medium.com/bits-and-behavior/my-splash-2016-keynote-... This author takes the perspective that programming languages are much greater than the sum of the syntax + semantics + toolchain + libraries, and treating them as such is limiting their potential.
- constantcrying 1y ago>Common answers to this question will include words like abstraction, performance, convenience, usability etc. The problem with these answers is that apart from the measurable, they are all subjective, aesthetic choices. That just is not true at all. These are all legitimate engineering tradeoffs, which any serious project has to balance. Calling this "aesthetics" is completely dishonest. These aren't arbitrary categories, these are meaningful distinctions engineers use when evaluating tools to write software. I think the students better understand what programming languages are than the teacher. If you accept that a programming language is a tool and not just an academic game of terms, then all these questions have clear answers.
- Rochus 1y ago> These are all legitimate engineering tradeoffs Agree, and we actually have both the standards and established methods to conduct representative tradeoff studies. But this knowledge is mostly ignored by CS and programming language designs. Even for Ada, there was little empirical evidence for specific design decision. A systematic survey discovered only 22 randomized controlled trials of textual programming language features conducted between the early 1950s through 2012, across six decades. This staggering scarcity explains why language designers rely heavily on intuition rather than evidence (see e.g. https://www.cs.cmu.edu/~NatProg/programminglanguageusability/Slides%20for%20Usability%20of%20Programming%20Languages%20SIG%20at%20CHI%202016.pdf https://www.cs.cmu.edu/~NatProg/programminglanguageusability...).
- mellosouls 1y ago(2022) This is particularly important here as the essay makes no mention of LLMs or coding agents (which were still in their infancy in development environments; this article is post original copilot/codex but pre ChatGPT).
- aDyslecticCrow 1y ago> This is particularly important here No actually. Why is that important? I dont quite see why that is relevant. Could you elaborate?
- mellosouls 1y agoIn at least two ways, which you might see as alternatively positive and negative wrt whether expertise in programming languages is useful. Firstly, when using them to create software it's pretty obvious that experienced devs and people who understand theory have a greater ability to guide, curate and control them. Secondly, as they improve in ability we can see a paradigm change for people using them at least as significant as the jump from assembly to high level languages. Most programmers would have no need to study assembly these days. Either way, their omission (while appropriate for the year, if somewhat lacking in foresight) is a significant one that renders it somewhat dated already.
- cubefox 1y agoYeah. Now the trend goes in an entirely different direction: telling an LLM in natural language what to achieve using those programming languages. How quickly times change. Edit: I assume this comment gets downvoted because people don't like where we are heading, not because they really think LLM programming capabilities won't continue to improve at a staggering pace.
- aDyslecticCrow 1y ago> LLM programming capabilities won't continue to improve at a staggering pace. The error rate of models make language design, tooling, testing methodology and human review more important than ever before. This demands language evolution. You could get faar with lax testing and language tooling with enough caution and skill. but when LLMs enter the picture, that no longer flies. we need tooling, static analysis, testing paradigms, language design that restrict how dangerous the LLM is allowed to act. natural language is faar to fuzzy to replace programming (system specification is already famously impossible thing to do right). If you think it truly will replace code, i highly suspect you work om webbdesign, where testing and reliability was always a secondary concern. And even then, I think were already on the convergence platoe of LLM code. The companies are raising prices as diminishing improvement and balooning compute costs.
- lock1 1y agoFor me, I find reviewing and analyzing programming languages to be a fun activity. Writing esolangs is also fun, you can write it without needing to care about things like backward compatibility or practicality. This reminds me of recreational math & gamedev, you simply do whatever you feel is fun and design it exactly as you'd like it to be.
- harisb2012 1y ago[flagged]
- shevy-java 1y agoOld languages died or are barely in use anymore. I think it is more interesting to see which languages are still used today and how popular these are. Because this is also tied to the human user/developer. For instance, I used BASIC when I was young - not as a professional but as a hobbyist. I liked it too. I wouldn't use BASIC today because it would be entirely useless and inefficient.
- binaryturtle 1y agoBut is that a problem of the language itself, or is it just a problem of available toolchains? E.g. if the gcc compiler collection would come with BASIC support and you just could type something like "gbasic -O3 foobar.bas -o foobar" to get a properly optimised executable out of your BASIC source code file then some may would still use BASIC today, I guess? I started with BASIC too. Also enjoyed BlitzBasic2 for a long time on the Amiga. That's where I learned programming… back then when programming was still fun.
- MoltenMan 1y agoRealistically? No, not at all. The reason there are no toolchains for BASIC is because nobody uses BASIC (because it's not functional in our modern world), not the other way round.
- vbezhenar 1y agoWhy do you think BASIC is not functional? Our modern world does not differ from the 1980 world at all. Variables are variables, subroutines are subroutines. It fall out of fashion, along with Pascal, Perl, Ruby, but that's just fashion.
- f1shy 1y agoI have even seen pretty darn impressive things done with VisualBasic back in the day. And that were not hobby things. I've seen it used in very important mission critical telecommunication equipment. The compiler was custom, not the one from Microsoft. After all, the language had pretty much anything other languages had. How can a language be "inefficient"? You can say it lacked on expressiveness. Maybe was too verbose? But I would not place BASIC into the "verbose" category.
- doyougnu 1y agoI still like Olin Shiver's take on this: https://www.ccs.neu.edu/home/shivers/papers/why-teach-pl.pdf https://www.ccs.neu.edu/home/shivers/papers/why-teach-pl.pdf
- zweifuss 1y agoThere is something to the existence of fads and fundamentals. When I started, it was Object-Oriented-Programming (with multiple-inheritance and operator overloading, of course), Round-Trip Engineering (RTE), XML, and UML. IMHO, not the ideas were bad, but the execution of them was. Ideas were too difficult/unfinished/not battle-tested at the time. A desire for premature optimisation without a full understanding of the problem space. The problem is that most programmers are beginners, and many teachers are intermediate programmers at best, and managers don't understand what programmers actually do. Skill issues abound. "Drive a nail with a screwdriver" indeed. Nowadays, Round-Trip Engineering might be ready for a new try.
- patrickmay 1y agoOlin also wrote the greatest acknowledgment section ever: https://scsh.net/docu/html/man.html https://scsh.net/docu/html/man.html
- mekoka 1y ago> Java and its OO relatives capture a communications-oriented model of computation where the funda- mental computational elements are stateful agents that compute by sending one another messages; I wish even only half the OOP world actually understood it as the above.
- giancarlostoro 1y agoI always recommend people to learn at least one of the following: scripting language, compiled language, bytecode compiled language (C# or Java are industry giants), and at least one front-end web language either TS or JS. If they're still hungry I explain Erlang / Elixir / Gleam and tell them to try that out.
- ramon156 1y agoWhen studying programming languages you really have to focus on the why's. When I was learning Rust I started out just associating patterns with lib types. Need to dynamically hold items? Vec. Need a global mutex? install lazy_static. This is fine if you're beginning, but at some point you need to read about why people choose this. 9/10 times there's a more elegant option you didn't know about because you just did what everyone else does. This separates programmers from coders. The only reason I learned this was because my current company has programmers, not coders. I learned a ton from them
- ryandv 1y agoProgramming languages are obsolete in the LLM era. What current generation AI has revealed is that English is actually the ultimate representation of computer programs and systems, which is both sufficiently terse and precise to economically describe the operation of arbitrarily complex programs. There is no reason to study programming languages in 2025, other than as a historical curiosity - the same way one may study languages equally as pitiable as e.g. COBOL, Lisp, or MIPS assembly.
- christophilus 1y agoSarcasm, right?
- ryandv 1y agoThe best way to get a strong answer is to post boldly incorrect statements. Then I get other people to write my actually-desired arguments for me. I call it, "wetware LLM prompt engineering".
- 1718627440 1y agoAnd the wetware often refuses to do that and simply downvotes you. How dare they.
- ryandv 1y agoLike real LLMs it's a bit of a slot machine, but my comment history will assure you that the jackpots are far more attainable.
- DrScientist 1y ago> Programming languages are obsolete in the LLM era. Wouldn't LLM need to directly output machine code for that to be true?
- ryandv 1y ago
- rednafi 1y agoThe appeal of experimenting with languages varies widely between academics and industrial practitioners. When you’re in the business of creating languages, exploration often takes on the character of an art project. However, as a trench-line coder, I enjoy dabbling in languages to learn different techniques for achieving a similar set of goals without sacrificing pragmatism. In that sense, I rarely have the luxury to explore purely for exploration’s sake. So I wouldn’t describe abstraction, performance, or usability as “aesthetics,” nor would I spend time on a frivolous language that I know won’t gain much traction outside academia. I like reading the perspectives of academics just to see how wildly different they are from those of the people I work with in the industry. This is probably a good thing.
- Timwi 1y ago> I encourage everyone to create the most absurd, implausible, and impractical languages. Been there, done that: https://esolangs.org/wiki/Ziim https://esolangs.org/wiki/Ziim
- Rochus 1y ago> Usability is similarly ill-defined and hard to measure. Human factors are very well studied and standardized, and there is a well-established discipline called "Human Factors Engineering", which also provides established test and evaluation methods. Human Factors research is considered solid and well-established because it has been built on rigorous experimental psychology and engineering principles developed over more than a century, with systematic methodology and empirical validation. Even if much of it is unknown or ignored by computer science or programming language design, there are many disciplines where Human Factors Engineering is critical (see e.g. ANSI/AAMI HE75). Usability is therefore neither ill-defined nor hard to measure. Several ISO 9241 series standards address textual and command-based interaction directly relevant to programming language assessment. ETSI EG 202 116 provides extensive human factors guidelines for command language style. ITU-T Recommendation Z.361 provides guidelines for Human-Computer Interfaces in telecommunications management, incorporating the ISO 9241-10 dialogue principles. ISO/IEC TR 24772 addresses programming language vulnerabilities specifically from a human factors perspective. E.g. Ada did have substantial human factors considerations documented in its design rationale, directly contradicting the notion that such principles don't apply to professional developers or programming languages. It's rather that computer science seems to continue ignoring established fields ("Not invented here"). Human factors in software development have been overlooked by researchers in the software engineering and development research areas, despite their obvious relevance. So what is lacking is primarily interest or willingness, not the fundamentals and means.
- mfru 1y agoApart from ADA, what are languages / stacks with most aspects of "Human Factors Engineering" considered?
- Rochus 1y agoNiklaus Wirth designed Pascal (1970) with explicit pedagogical and human factors goals documented in his seminal paper "On the Design of Programming Languages". Wirth explicitly stated his belief that "insights gained from educational considerations could benefit programming language design in general, and that the simplicity and clarity he was striving for should be a guiding principle for all language design, serving equally pedagogical and development purposes". But - as with Ada - I'm not aware of any notable human factors engineering studies to validate design decisions. Also Alan Kay and the Xerox PARC team designed Smalltalk (as Papert did before with Logo) with profound human-centered considerations, and they even "tested" their early concepts with children. Also some other languages explicitly state human-centered design goals (e.g. Python, Eiffel), but as with Pascal or Ada the approach was more based on expert judgment, formal analysis, and established principles, not practical studies.
- cubefox 1y ago> Why do we design new programming languages? The main answer is that we have only a limited ability to modernize existing programming languages. For example, most languages are not null safe, because most languages are old and we can't make them null safe without breaking backward compatibility with most existing code. And we can't break backward compatibility for practical reasons. So Java will never be null safe, PHP will never be strongly or statically typed, etc. So for fundamental language features, replacing older languages is the only way to achieve progress. Unfortunately that's a very slow process. Python, the currently most popular language, is already over 30 years old.
- AnimalMuppet 1y agoIt's not just 30 years old. It's 30 years of people building libraries of useful code. If you "modernize" it so that much of that 30 years of work is thrown away, that's really expensive - maybe more expensive than continuing to build on a less-than-perfect foundation. But that turns into the trap of short-term thinking - eventually you reach the point where you would have been better off throwing it away and starting over. You don't reach that in the year you throw it away, though, nor in the year after.
- zozbot234 1y agoPython is one language that famously broke backwards compatibility with the 2.x/3.x split.
- bluGill 1y agoThat CAN turn into the trap of short term thinking. However if you keep investing in modernizing over time you can get most of the benefits of updated code without having to scrap everything. The catch is you will also have a bit of old code that cannot be modernized reasonably, and new code has to somehow interoperate with it. Which means languages can't break anything because it might be the one thing you can't figure out how to not use anymore even though you know better and would do it different if you started today. Worse often the problem is an early design decision and so the bad practice is everywhere and you can't get rid of it in any one place because everything depends on it.
- scriptweaver 1y ago[dead]
- le-mark 1y agoOne of PGs essays hit on this when he talked about “blub”. Building a language for a specific solution/domain was/is expensive, but using a language to build abstractions or an internal domain specific language has been much more tractable. As such some languages are more or less suited for this activity; Lisp being the king then Ruby then etc. So to me the study languages was interesting from this DSL perspective.
- killthebuddha 1y agoThe answer to (2) is, IMO, "to make computing cheaper". It's interesting to me that this is not the obvious, default answer (it may not be the most actionable answer but IMO it should at least be noted as a way to frame discussions). I think we're at the tail end of computing's artisanal, pre-industrial era where researchers and programmers alike have this latent, tacit view of computing as a kind of arcana.
- jiriro 1y agoThe author says: “This class is about the study of programming languages.” Where is that class?