A troubling thing about alternatives to s-expression representation: to date, I don't know of anyone who, once they understand s-expressions enough to advocate for how the alternative syntax is "better" ends up dogfooding it themselves. Instead, they use s-expressions.
@cwebber The "s" in s-expression stands for "stockholm syndrome"
(ha ha only serious)
@cwebber Just to add some context to the toot for the readers that are not aware of what is happening. Racket is thinking of introducing a new language named Racket2, a language that is not based on parenthesis.
@cwebber A few things: I use a mixed-syntax Lisp, and yes I absolutely use some of its syntactic features. It's hardly the best designed alternative to s-expressions, but they got enough right in SKILL that the syntax is useful.
We're talking Racket and PLT here. They're going to insist on something that they want to use. Maybe they'll fail, but imagine if we get something with the syntactic elegance of OCaml or F#, and the ease of use and macros and such, of Racket.
@cwebber Also, John McCarthy used m-expressions. Anyone who waxes too poetic about deep understanding of Lisp and s-expressions needs to face that fact.
I don't think any of us smug lispers believe that McCarthy was a prophet inspired by the holy spirit, or something. He was just a smart guy who stumbled upon some very fundamental insights, that were later refined into manifestation of pure syntactic glory in the form of S-expressions.
S-exps may not have been the original intent, but they _are_ better.
@temporal @tfb @cwebber Anyone reading the old LISP manuals, and noting that they are using three different notations to describe the same thing, often literally writing the same algorithms three times, should realise that that is not the optimium state of things.
The solution was simply to eliminate the two superfluos syntaxes.
Obviously, they realized that having multiple syntaxes for the same thing - including a complex mathy one and a simple tree representation - is not an optimal state of things. So they got rid of the superfluous syntaxes and left the simplest one.
This still isn't an argument that s-expressions aren't a local optimum for programming syntax; it's only an observation that things don't get invented in one step, but need time and attention to be refined.
Everybody knows that FOO notation is superior to BAR, because I like FOO more and BAR has *these* flaws. Some argue that FOO has *such* flaws, but when you actually use it for a while you get used to it and it is not a big deal. Clearly people who doesn't like FOO are ignorants who are unwilling to invest some time to "feel it".
Now you may substitute FOO and BAR with any two of mexp, sexp, indentation-based sematnics etc (in any order!).
@cwebber s-expressions are a very strong local optimum, so they suck people in when they cross the event horizon.
S-exps are a close-to-minimal, unambiguous notation of trees; with syntactic transforms, also a concise way to express code. Trying to make them prettier in some aspect necessarily makes them worse in other aspects. Trying to make them not look like trees makes you lose the benefit that is ease of syntactic transformations.
Once people see past the parens & realize this, they stay with s-exps.
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!