Skip to main content
Clarified a few points
Source Link
metasoarous
  • 3k
  • 1
  • 24
  • 24

Creating objects with reify to some extent accomplishes this in thatwould give you get an object with an anonymous type. Since that type is anonymous, there is no way to extend it to any otherfurther protocols than were. But this is only one sided; it doesn't prevent anyone else from extending the protocols found in the body of reify to other types/records.

However, I don't think there is any way to accomplish this with records or, types or protocols (except perhaps by digging into the underlying implementations).

Creating objects with reify to some extent accomplishes this in that you get an object with an anonymous type. Since that type is anonymous, there is no way to extend it to any other protocols than were in the body of reify.

However, I don't think there is any way to accomplish this with records or types (except perhaps by digging into the underlying implementations).

Creating objects with reify would give you an object with an anonymous type. Since that type is anonymous, there is no way to extend it to any further protocols. But this is only one sided; it doesn't prevent anyone else from extending the protocols found in the body of reify to other types/records.

I don't think there is any way to accomplish this with records, types or protocols (except perhaps by digging into the underlying implementations).

Source Link
metasoarous
  • 3k
  • 1
  • 24
  • 24

Creating objects with reify to some extent accomplishes this in that you get an object with an anonymous type. Since that type is anonymous, there is no way to extend it to any other protocols than were in the body of reify.

However, I don't think there is any way to accomplish this with records or types (except perhaps by digging into the underlying implementations).