You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
following #1581, it is not good practice to encourage people to use %identity everywhere, or at least we should provide a more obvious syntax:
[%bs.cast: 'a -> 'b] (* similar to (Obj.magic (x : 'a) : 'b )* )[%%bs.cast.xx : 'a -> 'b] (* similar to external xx : 'a -> 'b = "%identity" *)
The reason is that bs.cast is not first class, while Obj.magic or external would be first class and can be aliased, with this addition, we can ask users to cast types explicitly
The text was updated successfully, but these errors were encountered:
I'm not really a fan of bs.cast because Obj.magic already does it, and such calls should absolutely be minimized as it is and magic makes it very obvious to "Be Careful For Here Be Dragons"...
following #1581, it is not good practice to encourage people to use
%identity
everywhere, or at least we should provide a more obvious syntax:The reason is that
bs.cast
is not first class, while Obj.magic or external would be first class and can be aliased, with this addition, we can ask users to cast types explicitlyThe text was updated successfully, but these errors were encountered: