4 ms·
While some of the things said there cannot be assessed by an outsider, the last paragraph that starts with: "Scheme has an outsized importance in the world of
by adrian_b 3y ago
While some of the things said there cannot be assessed by an outsider, the last paragraph that starts with:
"Scheme has an outsized importance in the world of programming languages compared to its actual use in industry, because it has so often pioneered features that later broke into the mainstream.".
is doubtless true.
Scheme belongs to a list of at least two dozen historical programming languages that have introduced very important innovations and anyone who has the ambition of creating or improving any programming language should be familiar with all of them.
I consider sad the fact that all more recent attempts of introducing new programming languages appear to have been made by people who happened to have some brilliant idea about how to improve some feature of programming languages, but otherwise they seem to have little knowledge about past programming languages, so they combine their new good feature with various bad features from a few languages that happen to be popular now, due to various historic accidents, even if already many decades ago better alternatives were known.
Because of this continuous reinventing of the wheel, all the available programming languages include various combinations of good features with bad features, so none is completely satisfactory.
- acegopher 3y agoDoes there exist a catalog of these pioneering or best practice features, and bad features that should not be replicated? It might be worthwhile to have a tome of such for future language designers to learn from.
- winter_blue 3y ago> Does there exist a catalog of these pioneering or best practice features, and bad features that should not be replicated? It might be worthwhile to have a tome of such for future language designers to learn from. A "programming language features" wiki cataloging such features (and their pros/cons) would be amazing.
- adrian_b 3y agoI am not aware of any such catalog, so I had to compile one for my personal use from reading a very large number of old documents. There are a few books about the history of programming languages, but they are mostly descriptive and contain little comparative analysis of the value of various features. Moreover because due to space limitations they have to mention only a part of the features of the languages that are described, the choice of what to mention and what to ignore in the description of a language may be not the most appropriate from the POV of an experienced programmer. Therefore I have found more useful the original manuals of various programming languages, from when they have been launched, during the fifties, sixties and seventies of the 20th century. After 1980 the pace of innovations has slowed a lot and most of the languages that introduced those innovations are still used today, so finding documentation about them is no longer difficult. While C was itself an innovative language, the fact that it included very few of the features of the languages contemporaneous with it ensured that many of those features are not available even today in mainstream languages, while other features have become widely used only after decades after their invention, for instance iterators have already been introduced in 1974, in the same year with C, but they have been revived only a quarter of a century later. Fortunately now there are a handful of Internet sites dedicated to the preservation of the history of computers and programming languages, from where it is easy to download most of the old documentation.
- ethbr1 3y agoOne reason that such a list might not exist is its inherent multidisciplinary nature. Program language design is also: - Performant compiler design - CPU/GPU hardware optimization - Programmer ergonomics - Large software project organization - Source code hygiene - Evolutionary flexibility - Platform management and organization That's a lot of intersections! And it's reasonable that we get programming languages with flaws in one or more areas simply because their designers weren't experts in yet another needed field.
- samsquire 3y agoThanks for this comment. I agree! Those things you listed all interact with eachother. I am still trying to get my head around orthogonality in design and how to design permutations/combinations that work together well and are flexible.
- ethbr1 3y agoI'd be fascinated to see a graph based approach to programming language features, but I'm not sure they're decomposable and independent enough to make it feasible. Start by listing out programming language qualities that are good/bad/intolerable for each of those other interaction categories, then work that backwards into a set of required features for a desired language. E.g. X makes writing a Y compiler optimization impossible
- samsquire 3y agoI have had the same thoughts. I am writing about your idea: Structured Interaction Programming: https://github.com/samsquire/ideas5#350-structured-interaction-programming-trying-to-restrict-interaction-complexity-and-implement-arbitrary-software-composability-of-abstractions https://github.com/samsquire/ideas5#350-structured-interacti... Knowledgegraph programming language: https://github.com/samsquire/ideas4#334-knowledgegraph-programming-language https://github.com/samsquire/ideas4#334-knowledgegraph-progr...
- zeckalpha 3y agoThe decadal History of Programming Languages conference and its proceedings are a good reference for this.
- thaumasiotes 3y agoThis is something that always makes me sad: In C, the escape character for literal strings, as interpreted by the C compiler, is the backslash. ("\") Also in C, the escape character for format strings, as interpreted by the printf function, is the percentage sign. ("%") This is the correct way to do things, for the very obvious reason that neither the compiler nor printf can get confused by the input the programmer provides. Directions to the compiler look nothing like directions to printf. But for some reason, this knowledge of how to define formats was completely forgotten, and so regular expression parsers were all defined to use a backslash as their escape character. There is no earthly reason you would want to do this. It causes many, many problems, and has no benefits, to use the same escape character for the compiler/interpreter and for the regex engine. But we're doing it anyway.
- vbezhenar 3y agoLua uses % for patterns.
- josephg 3y agoSounds like you have a programming language in you, if you have opinions on what all the good features are. Might be fun to sketch it out at a minimum.
- sanderjd 3y agoWhich new languages are you talking about here? The new languages I'm familiar with (which, granted, are mostly from the period between like 2008 and 2013, so maybe you're talking about much newer ones...) all seem very steeped in familiarity of historical languages. For instance, this article mentions Rust's hygienic macros, which were certainly developed with knowledge of Scheme's earlier work on that.
- adrian_b 3y agoRust is one of the typical examples that I had in mind. While it has some very nice features, they are combined with ugly mistakes inherited from languages such as C. For instance the need of using the address-of operator for function parameters passed by reference is ugly and pointless. Moreover, the distinction between parameters passed by value and parameters passed by reference is a big mistake in the design of a programming language. Already in July 1977, the DoD Ironman requirements for computer programming languages have shown the only right way of classifying function parameters, i.e. in 3 kinds, in, out and in-out (this had been inspired by the language Jovial, previously used in some DoD projects, but Ironman has improved upon the Jovial version of parameter specification). When any function parameter is specified as belonging to one of these three kinds, then it is irrelevant whether they are passed by value or by reference. That is an implementation choice that belongs to the compiler and which is completely transparent for the programmer (e.g. the programmer does not care whether an in-out parameter is passed by reference, i.e. the function receives a pointer which it uses to modify directly the parameter, or it is passed by value, when the function receives a copy of the initial value of the parameter and at function exit the final value of the copy is copied back to the caller). Besides the burden imposed on the programmer to care about how parameter passing is implemented, the failure to adhere to the Ironman requirements may cause serious performance degradation. The ugliest parts of C++, which, especially before 2011, were frequent causes of confusions, bugs and low performance, derive from the failure of C++ (inherited from C) to distinguish the out parameters from the in-out parameters. To work around this misfeature, which is especially important for an object-oriented language, C++ had to invent some kinds of constructors that would not have been needed otherwise, it also had to handle constructors in some special ways, different from the other kinds of functions, and then it had to continue to invent new tricks for fixing performance problems, like move semantics. The inappropriate way of classifying function parameters is just one example of many programming language defects that are still widespread even if the right solutions were known fifty years ago. It would take more space to explain the implications for OOP of distinguishing out parameters from in-out parameters, but the main result is that many redundant operations are avoided automatically and effortlessly, while the C++ compilers have needed several decades of improvements until they have become sophisticated enough to avoid such redundant operations when handling big objects, like in libraries that implement operations with matrices and vectors, and the compilers still need considerable help from the programmer, who has to specify details that should not have been his or her concern.
- twic 3y ago> is doubtless true And yet the list of features given to illustrate that point in the article consists entirely of stuff which is not in fact mainstream: > Proper tail calls as the fundamental means of iteration is now standard in functional programming. Transformation to continuation-passing style as the basis of compilation likewise. Hygienic macros — now part of Rust and even being considered in Python — were pioneered by researchers who used Scheme as their test bed. That research became part of the Scheme standard in R5RS and R6RS. In functional programming, a lot of research is being done at the moment in algebraic effects, which might revolutionize how side-effects like I/O are done in languages like Haskell — and all this work is based on research into delimited control operators, research which was done by Schemers.
- chriswarbo 3y agoContinuation-passing transforms are very common in compilers. There used to be debates about whether it's better/worse than static single-assignment (SSA), but they later turned out to be formally equivalent :) The lack of tail-calls in "mainstream" systems (i.e. the ones I get paid to use) is certainly very frustrating. Functional programming ideas are getting more popular, but some of them can be hampered by lack of tail-calls (e.g. using abstractions like Monad is reasonably common in Scala; but naive implementations will cause stack overflows due to the JVM's lack of tail-calls). Hygenic macros and algebraic effects aren't common in existing languages (although the latter is often provided by libraries; again, I've noticed this creeping into the Scala world), but I've noticed that many (possibly even most) new programming languages have one or both of these. Indeed, regarding algebraic effects: about 10-15 years ago it was common to see languages created for algebraic effects (i.e. someone wanted algebraic effects, so they made a language which has them); whilst these days it's common to see languages "default" to algebraic effects (i.e. someone wants to explore an idea, so they make a language for that; their language does I/O using algebraic effects, because what else are they gonna do‽). I see that as a sort of consensus, that those are the "correct" way to go; if backwards-compatibility isn't an issue. "Delimited control" is definitely mainstream. Unfortunately most languages seem to implement some weak, ad-hoc form (try/throw, async/await, for/yield, early return); then later have to add more; then more; rather than just implementing the full thing to begin with (e.g. shift/reset, or equivalent).
- vbezhenar 3y agoWhat makes a good or bad feature often is subjective. I hate return errors and I think that exceptions is the best thing ever (not checked, though). Many people have the opposite opinion.
- chriswarbo 3y agoHeh, I notice that many languages/features are described using the word "modern". I'm not entirely sure what the intended meaning is, but it seems to mean "something that's been well understood since the 1970s, but isn't done by C, Java or Python". Indeed, it's crazy that Scheme, C, ML, Prolog, Smalltalk, etc. were all developed around the same time; yet C is apparently the one we went with... It now appears like many programming languages (Java, Dart, Swift, etc.) are gradually evolving into ML, e.g. introducing "modern features" like sum types, ADTs, pattern-matching, module systems, etc. (I'm less familiar with C#, but it seems like that's being dragged into the "modern" era by F#)
- spott 3y agoI mean, from the perspective of the time, was anything other than C really an option? It was a time when computers were outrageously compute and memory limited, and it was the only language that didn’t have huge (at the time) compute and/or memory costs associated with using it. We weren’t ready for higher level languages at the time.
- wrs 3y agoPeople developing languages have the same computers as everybody else. It’s only a slight oversimplification to say that C won because Unix won. There were plenty of usable high-level languages, not to mention plenty of low-level languages besides C.
- wbl 3y agoLook up when common lisp was invented. Pascal was also widely used including on classic Apple machines, and the Alto implemented smalltalk. What lead to C dominating was the spread of Unix driven by Bell's legal constraints and then the BSD sockets implementation.
- peterfirefly 3y agohttps://en.wikipedia.org/wiki/Mesa_(programming_language) https://en.wikipedia.org/wiki/Mesa_(programming_language) There were several similar languages that could have filled the same ecological niche. C was widely available and de facto standardized (with an existing body of code as a forcing function + the existence of pcc). The others were not.
- sourcepluck 3y ago> "Scheme belongs to a list of at least two dozen historical programming languages that have introduced very important innovations". What are they? Or, where can I go read something more about this? Any tip-offs greatly and sincerely appreciated. I'm relatively new to programming, and have been focused mostly on Lispy ones (Emacs Lisp, GNU Guile, and most of all Common Lisp), so in browsing the propaganda around these languages, I'm constantly running into things that were allegedly pioneered in Common Lisp in particular. Would love to read about the 20+ other languages with similar histories of innovation.
- adrian_b 3y agoI do not have time right now to search for the exhaustive list, but some of the most important old languages that introduced innovations are the following (most programming languages have introduced only one or two important innovations, so if you trace the history of each feature that is present in a modern programming language almost each of them leads to a different old programming language): Heinz Rutishauser (1951; the first form of the "for" loop); IBM Preliminary FORTRAN (1954-11-10); IBM FORTRAN (1956-10-15); IBM FORTRAN II (1958); John McCarthy, AIM-001 (1958-09); John McCarthy, AIM-003 (1958-10); John McCarthy, AIM-004 (1958-10); IAL (1958-12); John McCarthy, AIM-008 (1959-03-13); LISP I (1960-03-01); COBOL 60 (1960-04); ALGOL 60 (1960-05, 1960-06-28); Edsger Wybe Dijkstra, "Recursive Programming" (1960-05-11); JOVIAL; "A Programming Language" (Kenneth E. Iverson, 1962-05); IBM FORTRAN IV (1963); CPL (1963-08, 1965-10, 1965-11-29, 1965-12-20); SNOBOL (1964-01); BASIC (1964-10-01); "Definition of new data types in ALGOL x", John McCarthy (1964-10); IBM NPL (1964-12); "Record Handling", C. A. R. Hoare (1965-11); EULER (1966-01); SNOBOL3 (1966-03-04); Algol W (1966-06, 1968-03); IBM PL/I (1966-07); BCPL (1967-07-21); PL360 (1968-01); SIMULA 67 (1968-05); IBM APL\360 (1968-08); SNOBOL4 Version 2.0 (1968-10-07); ALGOL 68 (1968-12-20); BLISS (1970-01-15; 1971-12); MACLISP (1970-03-01); Pascal (1970-11); B (1972-01-07); C (1974-01-15); Alphard (William A. Wulf, 1974-04-30); SCHEME (1975-12); Modula (1976-03); Mesa (1976-10); IRONMAN (1977-07); ALGOL 68RS (1977-08); Alphard (1977-08); CLU (1977-08); Mesa Version 3.0 (1977-10); "Communicating Sequential Processes", C.A.R. Hoare (1978-08); Icon (1978-09-29, 1979-04); Ada (1979-06); Bjarne Stroustrup C with Classes (1980-04, 1982-01); Modula-2 (1982); C++ (1984-01-01); Occam (1985); ANSI X3.159-1989 "Programming Language C" (which introduced "enum"); Also the language ML and its derivatives are important. By innovation I mean either a new feature that could not be expressed directly at all in previous languages, for instance CPL has introduced "break", or a new kind of syntax format for expressing a feature that already existed in previous languages, for instance MACLISP has replaced "(QUOTE X)" by "'X". The dates correspond to language versions that introduced innovations, not necessarily to the first version of those languages.
- deleted 3y ago[deleted]