1. 57
  1.  

  2. 15

    Regarding #5, a Lisp that compiles to C++ metaprograms, this is probably a good start:

    http://matt.might.net/articles/c++-template-meta-programming-with-lambda-calculus/

    It looks like it already supports integers because they are valid C++ template parameters, so you don’t need Peano numbers or anything like that. It does sound like a fun exercise!


    Regarding #4, a Python with algebraic data types, Guido van Rossum mentioned at the recent group interview [1] that pattern matching is one thing he wanted to add to the language, but he couldn’t find syntactic space for it.

    That’s unfortunate because I would like the feature too. I have experience with one-half of ADTs in Python by using ASDL in Oil:

    http://www.oilshell.org/blog/tags.html?tag=ASDL#ASDL

    It’s half because you really need two things: (1) the schema declaration syntax, and (2) the pattern matching syntax. ASDL is only the former. I’ve gotten a lot of mileage out of it, so now I want the second half as well :) I’ve been interested in Pyret for the same reason, but I haven’t played with it.

    The Tom compiler can be viewed as the second half: bolting on pattern matching on to languages like C, Java, and Python, but I don’t think the “bolt on” approach is worth it in this case.

    https://en.wikipedia.org/wiki/Tom_(pattern_matching_language)

    [1] https://www.reddit.com/r/ProgrammingLanguages/duplicates/banx5p/a_language_creators_conversation_guido_van_rossum/


    Regarding #3, an effect system for Forth, I think Factor was one of the most thorough explorations of stack languages and static types. But I’m not very familiar with the area.

    Regarding #2, I also feel the need for a better stream processing language, but I think types are only a small part of the problem. I wanted to do something like that in Oil, i.e. a better “awk”, which Sawzall was somewhat based on, but that’s pretty far in the future …

    1. 3

      a Lisp that compiles to C++ metaprograms

      Just wanted to mention; For anyone looking to do heavy metaprogramming in C++, terra might be a good alternative. It distills what makes C++ metaprogramming so great and builds a language around it.

    2. 5

      Dependent types and ownership: see ATS and DDC (DDC does not go to full dependency).

      For a functional language targeting C++ templates see EvilML, which does exactly this with ML as input language.

      1. 4

        I spent this weekend writing a Forth designed for music synthesis […]

        I would love to hear more about this part specifically!

        I wonder how the author’s audio-focused Forth compares to, say, Sporth.

        1. 4

          I’d also like to see a Python-like scripting language with ADTs. ADTs are a super useful feature in a language and it’s a shame that none of the most widespread, newbie-friendly programming langaues (Python, JavaScript et. al) support them.

          1. 6

            FWIW TypeScript’s type system is powerful enough to “emulate” algebraic data types:

            https://www.typescriptlang.org/docs/handbook/advanced-types.html (search for “algebraic data types” and scroll down)

            There’s still no pattern matching, but I think it’s a lot better than nothing. So in theory you could upgrade your JS code to TypeScript with this idiom, although I haven’t done it myself.

          2. 3

            Something about this argument feels incorrect but I can’t tell exactly why. My intuition is that the design space of programs is already pretty well covered and language writers have been “combining features” to see what happens for a while now. So I don’t think the bottleneck is about combinations of features. I think the bottleneck is around communicating intent through languages to other people. Another language with a borrow checker and dependent types is unlikely to solve that problem. The folks working on Eve tried to address those issues but it was a bigger research task than anyone expected.

            So here’s a language I want. I want a language that doesn’t make me an abstract interpreter. I want a language that combines algebraic topology and abstract interpretation.

            1. 3

              My list that will probably never happen:

              • An ml that compiles to go.
              • A C like with compile errors if you forget to call a cleanup function.
              • Something like a mashup between bear ssl t0 forth and C for writing efficient parallel code.
              1. 3

                I found this last year; looks like it may not be too active but it was interesting to me nonetheless: https://github.com/joshsharp/braid

                1. 1

                  Yeah, I starred it then lost the link, sad it looks like the author lost interest.

                2. 1

                  An ML that compiles to Go: https://github.com/joshsharp/braid

                  1. 1

                    Oh, I totally forgot, some sort of semi typed new shell language

                    1. 1

                      I am curious. What would you find particularly valuable in an ML language that compiles to Go?

                      1. 5

                        Go has a fantastic runtime and lots of libraries, but I just found reason ML for more fun to write as it’s a bit higher level and less verbose. Seems like a good combination to me.