What should I build Subtext 9 on?

This will still be just a research prototype of a programming language and environment, so I don’t care about deployment issues. Want to have:

  1. Discriminated unions and pattern matching
  2. IDE with debugging
  3. Rich GUI framework with functional style (Elm/React)
  4. Healthy ecosystem

Options:

  • Elm — nice and simple, but better suited to apps than an entire language environment. I really need mutation. Bit of a walled garden. Needs a real debugger (yes reproducibility improves printf debugging but it’s still just printf).
  • Dart/Flutter — could work. Refreshing simplicity compare to the chaos of web programming. Flutter is very appealing. But I’ve used Dart before. It is an old-fashioned OO language and I’ve gotten tired of that. Wake up and smell the pattern matching! Working in Dart felt like living in a remote province.
  • F#/Fable/React — nice, but a big language, with a lot of .NET baggage. Initial experiments ran into difficulties with the .NET tooling.
  • ReasonML/Bucklescript/OCaml/React — technically powerful, but no one seems to be in charge and it’s a big hot mess. Bucklescript is one guy in China. No source level debugger.
  • Swift/SwiftUI — very enticing: a modern language with a modern UI from people who really know their UI. Stealing the best parts of Flutter. Full tech stack fully documented and supported from one company with unbounded resources. Sadly, SwiftUI looks to be just too new. Still very mobile-centric. There isn’t even a table layout.
  • Rust/? — Rust looks a bit scary, but some people I respect love it. There is no good GUI story yet. In a couple of years I expect there will be a SwiftUI clone, compiling to WASM and native. Could be my future production platform.
  • TypeScript/React — utterly mainstream, and I already know it. Has a weak form of discriminated unions. Good enough.

18 Replies to “What should I build Subtext 9 on?”

  1. Dart/Flutter: one solid language/platform with which you can do all the things.

  2. Rust is terrific for back-end development where memory usage and performance matters. I like it because of its strong type system. As for the front-end, ReasonML was much easier for me to understand than Elm, despite spending two years trying to “get it”, and felt safer than plain JavaScript. ReasonML is similar to Rust and compiles quickly to clean JavaScript. With ReasonReact and reductive I can design a well-structured and maintainable application. For the desktop, I like Electron, despite it being rather heavyweight; you can use ReasonML there as well.

  3. Vue.js is really nice. Has similar component model as React but much simpler overall. Combine with vuetify components and vuex (like Redux).

  4. Try Prolog. You would have to combine e.g. SWI Prolog for IDE and debugger with Tau Prolog (ISO Prolog implemented in JS) for browser-based GUI. The ecosystem is deep and slow. Prolog development is stately compared to most other languages. Look at “Logic programming and compiler writing” by David Warren and the follow-on research.

  5. Have a look Typescript with Svelte. You might just fall in love with it. Helpful community, too

  6. I’ve been using Typescript/React/Electron for my structured editor prototypes. It’s probably the most productive setup I’ve used in my career. The new React Hooks are quite nice.

    The editing experience is pretty great (for a text editor, using VS Code), reliable red-squiggles, hover-to-get-the-type, and you can get hot-reloading working w/o too much effort. It also lets you build for both desktop and web experiences nicely.

    Debugging in Electron/Chrome is kind of amazing to someone like me w/ a c++ background. Just gotta get source mapping setup and it works really well.

    The biggest downsides is all the quirks it brings over from JS (but you can avoid most of them), and the lack of any Typeclass kind of thing so you wind up writing a lot of “…Equals” functions manually, but the type system is pretty darn useful.

    1. I should mention I’ve also looked into Dart/Flutter and had exactly the same reaction you did.

      I looked into ReasonML quite a bit, and there’s a lot of stuff to be excited about, but I found myself fighting the maturity of the tooling a lot and overall it wasn’t very productive. I’ve heard similar feedback from folks that have really invested heavily in it.

      Swift is pretty great, but the type system disappoints, and it locks you into a limited set of platforms.

      We’re investing a lot in Rust for our company, and it’s fantastic for a certain set of things, but not for prototyping programming editor ideas.

      1. I’ve actually moved my work for the past while to an Atom plugin (still using React/TS) and haven’t been using hot reloading (though I haven’t really tried, maybe I should). The idea behind doing an Atom plugin is that I don’t have to add support for tabs and all the uninteresting editor stuff. It’d also make it super easy for folks to try out. I prefer VS Code, but the plugin system is much more locked down.

        Webpack offers the basics needed for hot reloading, and I believe there are a number of projects that map that support on to React. I’m not sure what the current hotness is.

Comments are closed.