Hey guys, I’ve been at it for a while. I hope everyone is still well, and I hope you’re still enjoying ReScript. I had a pause from it, and I got back into it a while back.
Alright, so first things first - it was actually difficult to get back into it, but once I did, I was in the zone! Here’s an amazing anecdote. I had an old ReScript code base of mine, and I refactored it to be up-to-date with my more recent level of expertise (hah!). I started refactoring - I couldn’t get anything to compile for a couple of hours. As you’re probably familiar with, changing stuff around in ReScript gives a kind of domino effect (especially if you start swapping out 3rd party libs throughout - hello rescript-future, bye rescript-promise [sorry @ryyppy]). But once it compiled, it ran without any issue whatsoever. Amazing.
Well ok, so, now I want to become a guru. I want others to look at my ReScript code and just feel “hey, that guy must be from the fourth dimension.” I want it to be performant and concise, but also beautiful. I love code conventions and idiomatic code - but I haven’t found any good sources on it. In particular, I feel it’s difficult to manage chained promises (I tried async/await in ReScript - didn’t like it) and futures. They quickly turn into a mess.
So what are your thoughts on this, and what does your code look like, and what are some nice patterns or just ideas for writing good ReScript code?