Why not rename Belt too?

It seems like the Belt and Js modules can be considered analogues, where Belt functions are preferred to their Js counterparts, if available.

Rs and Js would reflect this analogy better, and would do away with an indirect buckle-reference.

I understand this is extremely unimportant but I figured since you’re in the process of renaming anyway, it does not hurt to propose.

Thanks for your work in reducing the mental overhead for new users.

10 Likes

We could even mimic Rust on that one and call it Std :slightly_smiling_face: (and possibly removing Pervasives in favour of it)

4 Likes

I’d rather go with R and J if possible. :grin:

1 Like

If we are renaming and starting with a clean slate, it would be a good start to make the modules ending with ‘2’ replace the default modules. Put all uncurried functions that now end with U into a separate module so they don’t pollute the module.

8 Likes

I really like the idea of cleaning up the JS-specific libraries. However, Pervasives and some of the other core OCaml modules do provide real value in certain situations. For example, the Int64 module can be a decent replacement for BigInt if the browser target doesn’t yet support BigInt (looking at you, Safari!).

Of course, some of the OCaml modules don’t make that much sense in a JS runtime, but perhaps there is some middle ground here?

Perhaps make them available under a “OCaml” namespace? (A bit like how in elixir the whole erlang Stdlib is still available)

6 Likes

Yeah, that seems like a good compromise :slight_smile:

I definitely think starting with a clean slate and using this as an opportunity to clean up would be a great idea. With onboarding js devs as easily as possible being a key goal, naming should probably follow Js conventions where ever it makes sense.

(bigInt looks to be in Safari 14 btw)

1 Like

I personally really like the name „Belt“.
You could still sell it as „a toolbelt providing you with the right tools for every job“ :smile:
Also it is really nice to write - at least on a qwertz Keyboard.

1 Like

Another confusing naming is the Js.Re. I would expect it to be something like Js.RegExp. But maybe there’s a valid reason for the Re