Skip to content

Contribution Question: Zero-cost vs ReScript developer ergonomics #23

Discussion options

You must be logged in to vote

I think zero cost should be our goal, but there are existing examples where ergonomics are preferred (although many of those were written before the type system added things like records-as-objects and polymorphic-variants-as-strings). So it's probably best described as "on a case-by-case basis".

In your two examples, getEntries seems better as zero cost (this style of binding is fairly common for flexible-argument JS functions) and mark is... arguable. The overhead of bundling all those names, and keeping them up to date if the standard changes, doesn't seem worth it.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by TheSpyder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #22 on September 06, 2021 01:29.