A year with ReScript for AIAD

Hi everyone !

I used ReScript as the main language for my projects before LLMs because of the typing system and code clarity.

This year was very intense, with the release of tilia 6, the work on tilia/query, and a database project (to be released as beta soon).

Just a year ago…

As agents arrived, they were confused with the flavors, old and new, of ReScript.

I had to check a lot of manual code for my numinum app experiment (React native app to train mental calculation)

Today, I exclusively work with ReScript for all my projects and I don’t need to guide the agents (but I give them llms.txt for tilia or other libraries).

It has given me an incredibly good and fast (and cheap) development flow, even for large projects (a database engine on top of RocksDB, around 80k loc).

Radif class inheritance diagram.

Since RocksDB is a blocking API, I decided for a purely channel based API in all of the codebase except the IndexedDB adaptor for the client. The code ended up deeply nested with callbacks (I think it reached 30??), until I used let? which saved the shape of the code, but didn’t save from the stack overflows as the project grew.

Two solutions emerged : bouncing, and looping (claude drawings).

In my day job, I had to touch java and legacy angular code (TS) for upgrades and I realize how a fast, incremental build totally changes the time it takes for agents to run.

My architectures now always push for two things:

  1. Using ReScript whenever possible, no questions asked
  2. Using dependency injection everywhere and ensure most of the tests are running concurrently

One is for the fast build and the other for the fast feedback loop.

Has anyone had that similar experience ? Have you also switched to ReScript for this reason ?

2 Likes

I know first-hand from Android development that Kotlin compiles even slower than Java. People accept this because of the better safety. But ReScript somewhat dismantles that this safety needs slower build times.

EDIT: I have overlooked you were doing React Native as well. So you probably know how long Android builds can take.

And ReScript 13 (still alpha, but you can use it for side projects for sure already) is even faster. With Opus 5.5 together, you can iterate stupidly fast. OpenAI’s Sol 6.2 is a little slower here for me but still great.

Using ReScript whenever possible, no questions asked

Yes, both for side projects and at work! Only legacy projects and a website are in TS at my workplace.

Using dependency injection everywhere and ensure most of the tests are running concurrently

Interesting, so do you actually use module functions for this or something lighter? In web projects I don’t really use them.


I think also the fast feedback loop is key to ship fast. So I’d prefer a slightly dumber model that is super fast, it gets feedback from the compiler immediately anyway and then can adapt. Ideally that would be a small local model running on your built-in GPU.

Thanks for this article btw and keep up the good work!

1 Like