rescript-compiler icon indicating copy to clipboard operation
rescript-compiler copied to clipboard

Deprecate/remove OCaml stdlib functions

Open cknitt opened this issue 3 years ago • 3 comments

As discussed with @zth: We should deprecate most functions from the OCaml stdlib and point people to Belt / Js.xxx2 / a new stdlib instead where appropriate.

So basically one would have to go through all files in jscomp/stdlib-406 and decide which functions are still needed. E.g. parts of Pervasives like string_of_int, print_endline, ... can be deprecated, as well as probably all functions in Array, List, Set etc. (although Array.get is a bit of a special case).

It may be tricky though where exactly to point the user in the deprecation messsage as long as there is no new stdlib in place yet.

cknitt avatar Nov 06 '22 09:11 cknitt

I think this is something for later on when Core is moved into the compiler. Moving to v12.

cknitt avatar Apr 11 '23 06:04 cknitt

Or already fully remove the OCaml stdlib + related primitives in v12, which would make revamping the stdlibs build procedure (#6826) much easier.

cknitt avatar Aug 25 '24 10:08 cknitt

Related: We will still need some sort of Pervasives and need to decide what should stay in there.

cknitt avatar Aug 25 '24 10:08 cknitt