Skip to content

Enhancement : more alignement with Javascript vocabulary #187

@jpolo

Description

@jpolo

Happy new year, and happy v11 !

I have read with great interest the last v11 which is very promising ! The uncurry by default and many other features shows a great energy to stay close to the JS ecosystem (and get rid of the legacy buckle script branding)

If we analyze ReScript as product rather than a language, talking to JS developers that want safety rather than FP programmers that do not want to use Javascript is a brilliant idea.

In the mean time I've noticed that some names that just look strange if you do not have a fp/ocaml background. (What is Exn ??? would say the profan developer).

I would like to propose to ReScript to go one step further in a future release with a radical alignment between ReScript and ECMAScript by using the same vocabulary / coding standard.

Here are some examples :

  • XXX.make => JS uses XXX.create (ex: Object.create, React.createElement, etc)
  • Exn => JS uses Error or throw (ex: Result.getOrThrow instead of Result.getExn), in addition JS uses very few abbreviations
  • String.get => String.at
    etc.

Of course there might be other occurrences and some libraries could also have the same problems. (I could help providing a full API audit and renaming suggestions based on existing standards if needed)

IMHO, ReScript v11 represents this instant when the technology offers a great basis for an ecosystem to grow but this ecosystem is not too big so breaking changes are still acceptable

What do you think ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions