janestreet / core_kernel

Jane Street's standard library overlay (kernel)
MIT License
217 stars 63 forks source link

Switch from special type names (sexp_{list,bool,array,option}) to attributes #80

Open copy opened 6 years ago

copy commented 6 years ago

Opening Corekernel or Base bring the type aliases `sexp{list,bool,array,option}to{list,bool,array,option}` into scope, which infamously infect OCaml tooling (merlin, utop) and confuse newcomers. See also https://github.com/janestreet/base/issues/39.

ppx_sexp_conv already supports attributes that supersede the old type names. So we should encourage users to switch to attributes and fix the original problem by moving the type aliases out of Core_kernel and Base (maybe to a submodule?).

ghost commented 6 years ago

Indeed, we have been talking about doing this change for a while. It's just that we never took the time to do it.

Regarding moving the types aliases to a sub-module, for the user this is basically as much work as switching to attributes. We could mark them deprecated with [@@deprecated] though.

copy commented 5 years ago

It would be wonderful if 2019 could be the year in which we don't have to see sexp_list any more. The more one uses merlin, the more often they come up, which is quite unfortunate.

yminsky commented 5 years ago

Yeah, it's pretty annoying. It's on our near-term todo list.

kevinji commented 5 years ago

See b415c54204224e09fec4763ff4f3398fdfa943a2!

seliopou commented 3 years ago

These have been deprecated for a while in base and core_kernel, so I'm gonna go ahead and delete them entirely.