Closed MoOx closed 3 years ago
Support for ocaml style classes was removed in 9.1. I wonder if they are truly necessary for the bindings, though.
hi @MoOx technically we did not remove class types, it is not exposed in rescript syntax though, so you don't need rush to convert such piece of code if you are busy, but you are suggested to migrate away from class types later.
Note in the latest release, you can compose structural types using object types (without need class types)
type small = {
"x" : int
}
type big = {
... small, "y" : int
}
let me know if you find something not expressible using object types
To be honest, I don't see any real reason to use class. I will just convert to record and use @send
if necessary.
Thank you for filing! Check list:
How to reproduce?
Use this
Try using
bsc -format
. The code just disappear. You can reproduce on the playground too (select .RE, paste the snippet, click on .RES, no more class).This is a problem for rescript-react-navigation as we have a lot of class to bind.