1. 18
  1.  

  2. 6

    If someone likes it, I don’t mind if they use it. But…

    • OCaml maintainers are now much more open to extending the standard library than they used to be
    • To me, the README doesn’t explain what’s “ergonomic” about it.
    • They mean native programs will depend on two non-standard libraries: JaneStreet’s and theirs? ;)
    • What exactly is the value of having “the same” API in native and JS? It can’t really be the same: there’s no forking or threads in JS, and there’s no DOM in the OS kernel.
    • String.fromList when pretty much all OCaml world has standardized on underscores seems like an odd choice.
    1. 6

      Tablecloth provides both camelCase and snake_case variants of every item.

      1. 4

        What exactly is the value of having “the same” API in native and JS? It can’t really be the same: there’s no forking or threads in JS, and there’s no DOM in the OS kernel.

        Perhaps this is for case where developers would like to reuse same code for backend and client. For example, I tend to use same class (linked as a library to both server and client), representing REST responses. Same goes for classes representing domain models (eg orders, accounts, etc). Each of those classes underneath contain arrays, hashmaps and so on.

        1. 2

          Hey, original author here. Basically, when you’re writing both your frontend and backend OCaml, the differences between the two are extremely frustrating, including how hard it is to share code. So this tries to reduce that pain.

          To your specific questions:

          • not really that useful cause bucklescript is stuck in 4.06
          • good point. This is of course subjective but think of it as “we didn’t like theirs so we made one we do like”. YMMV
          • the value of the same API is that you don’t have to remember two different names for the same function, and that you can reuse code more (as vladislavp points out)
          • in code that uses underscores, you’d use String.from_list
        2. 2

          Isn’t the example code on the README written in Bucklescript though?

          I wonder what’s the future of ReasonML given the recent changes in its Bucklescript alter ego: the new syntax, and .res extension look like they’re sunset-ing Reason.

          1. 1

            Not at all, Reason is alive and kicking: https://github.com/facebook/reason