1. 13

See also: Curly infix, Modern-expressions, and Sweet-expressions: A suite of readable formats for Lisp-like languages. (Discussed on Lobsters 4 years ago)

  1. 12

    I go the other way. I gave up on lisps because I love my types too much, but I wish more languages had s-expresion syntax - they’re such a joy to edit in an editor with appropriate tooling.

    1. 6

      Have you tried Carp?


      1. 1

        I have not, but it looks pretty cool. I don’t get much time to noodle around with random languages any more =|

      2. 6

        they’re such a joy to edit in an editor with appropriate tooling.

        I’d say this differently: it’s easier to build appropriate tooling for S-expression based languages. But if you have “extend selection”, a bunch of intentions for common editing tasks, typing assists and proper cursor placement, you’ll get a better editing experience for any language. But yeah, building all that is non-trivial.

        1. 2

          Hear hear! I started writing an s expression syntax for python once.

          It was a sad day when I admitted thatsuch a thing would have a user base of exactly one.

          1. 5

            Have you seen Hy lang?

            1. 2

              Surely you mean a use base of two!


              1. 1

                There’s https://github.com/hylang/hy in that field

                1. 2


              2. 2

                I think that’s a form of BDSM ;-)

                1. 3

                  Benign Dictator S-expression Mandates?

              3. 5

                I admit to having mostly skimmed the presentation, on account of not having had my coffee yet, but this reminded me of Dylan a little, and it’s probably no coincidence considering Dylan’s history. Anyone remember that?


                E.g. a fibonacci implementation lifted right off that page because I never was fluent in Dylan, and the last time I even tried to be was like fifteen years ago:

                define function factorial (n :: <integer>) => (n! :: <integer>)
                    n < 0     => error("Can't take factorial of negative integer: %d\n", n);
                    n = 0     => 1;
                    otherwise => n * factorial(n - 1);

                Granted, Dylan is (was?) explicitly typed and integrated a bunch of other paradigms and so on, it was very much a child of the 1990s. But in some ways it was a Lisp without all the parentheses. It’s an interesting precedent.

                1. 1

                  I mainly remember Dylan because one of (the main? the only?) people working on it were in comp.lang.lisp when Usenet still was a thing.

                  Dylan never really attracted me because I actually like SEXPs and languages with all that semi-colon & braces line-noise annoy me, although Python is an okey compromise.

                  1. 2

                    @brucem was a developer on it (still is?). He’s probably who you were thinking of.

                    1. 1

                      Yes, that was him, thanks.

                    2. 2

                      Oh, yeah. Dylan was a nice and fun language but I never really learned it, because I never really felt like I needed a programming language with all the good parts of Lisp, minus the Lisp syntax. The Lisp syntax is one of the good parts of Lisp in my book :-D.

                  2. 4

                    This was captured as the sweet-expressions SRFI (SRFI 110), but I believe that Wisp (SRFI 119) was created subsequent to this and elaborates on some of its designs.

                    There’s a library for Guile which seems to be fairly well-maintained as well.

                    1. 3

                      Reminds me of SRFI-110: “Sweet-expressions”: https://srfi.schemers.org/srfi-110/srfi-110.html

                      EDIT: …which I see was linked in the article description. Ignore me.

                      1. 3

                        McCarthy had the idea of M-Expressions but people liked programming in S-expressions too much. What’s old is new.

                        1. 3

                          Mathe… I mean Wolfram is basically the M-expr Lisp we never got, warts and all.

                        2. 2

                          See also Racket’s Honu language, which does similar things.

                          1. 2

                            I find this really interesting. The syntax almost reminds me of python.

                            1. 1

                              Ironic quote from Larry Wall (creator of perl) at 0:51: “Lisp has all the visual appeal of oatmeal with fingernail clippings mixed in.”