2 comments

[ 275 ms ] story [ 1150 ms ] thread
I have nothing to say about ReScript because I never used, but one reason I never used it is the crazy syntactic difference between records and objects; the former use bare names and the latter ones requires quoted names. How crazy is that?

Record literal:

    let me = {
      age: 5,
      name: "Big ReScript"
    }
Object literal:

    let me = {
      "age": 5,
      "name": "Big ReScript"
    }
The language definitely has a few quirks, a couple of them load-bearing, probably from the ocaml heritage. If you need really tight consistent syntax, well... it's better than ocaml but yeah rescript is probably not the language for you. I find I can tolerate a fair bit of wool if the underlying abstractions are powerful and easy to work with.

FWIW on this specific thing, I've used rescript quite a lot and I'm not sure I've ever written an object literal or declared an object type. They come from JS, but I almost always shift them into a real type in the extern binding.

You can't destructure or pattern match on them. Which both encourages coercing them and prevents the possibility of misusing them as records when you've chosen to keep them as objects. I'm not trying to change your mind on an aesthetic judgement, just this one doesn't come up that much.