rescript-lang / rescript-compiler

The compiler for ReScript.
https://rescript-lang.org
Other
6.74k stars 448 forks source link

`raise` -> `throw` #7113

Open cknitt opened 2 weeks ago

cknitt commented 2 weeks ago

For throwing exceptions, we have the function raise whose name was inherited from OCaml.

I would propose to rename it to throw in v12 to align it with JS.

cknitt commented 2 weeks ago

Should be easy to change as it is just an external definition in Pervasives.

However, for compatibility we can keep both in parallel for now, then deprecate raise at some point and eventually remove it at a later time.