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
There is a totally different syntax for anonymous object types and class instance types:
(Ptyp_object and Pcty_sig respectively). One is used to define types of object without knowing their classes, and the other is to define the return value of a constructor ("instance types"). They are unified by the type system seamlessly, but their type definitions use a different syntax.
I'm in the middle of sending out a parser update that improves them independently but they are not unified yet. There's no reason why they can't be unified, as the Ptyp_object syntactically only includes methods, whereas Pcty_sig includes that and much more. Just one more thing that unnecessarily gives objects a bad reputation.
The text was updated successfully, but these errors were encountered:
jordwalke
changed the title
Unify class "instance types" with anonymous object types.
[LOWPRI] Unify class "instance types" with anonymous object types.
Jan 14, 2016
There is a totally different syntax for anonymous object types and class instance types:
(
Ptyp_object
andPcty_sig
respectively). One is used to define types of object without knowing their classes, and the other is to define the return value of a constructor ("instance types"). They are unified by the type system seamlessly, but their type definitions use a different syntax.I'm in the middle of sending out a parser update that improves them independently but they are not unified yet. There's no reason why they can't be unified, as the
Ptyp_object
syntactically only includes methods, whereasPcty_sig
includes that and much more. Just one more thing that unnecessarily gives objects a bad reputation.The text was updated successfully, but these errors were encountered: