# \[BLOG\] Typesafe complicated combinations

**URL:** <https://discuss.ocaml.org/t/blog-typesafe-complicated-combinations/16548>\
**Category:** Learning\
**Tags:** announce\
**Created:** [April 25, 2025, 10:56am UTC](https://discuss.ocaml.org/t/blog-typesafe-complicated-combinations/16548 "2025-04-25T10:56:12Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![rand](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/rand/32/3055_2.png) [@rand](https://discuss.ocaml.org/u/rand)\
**Post date:** [May 10, 2025, 5:36pm UTC](https://discuss.ocaml.org/t/blog-typesafe-complicated-combinations/16548/2 "2025-05-10T17:36:34Z")

</div>

To those of you interested, I updated the text with [further discussion](https://r7p5.earth/blog/2025-4-25/Typesafe%20complicated%20combinations#h-illegal-states) of the design-pattern - specifically about the fact that it reverses the dependency-relation between combined data, vs what one would have done by aggregating data within data.

This is also loosely related to OO in an interesting way - in that objects in OO have identities, and _contain_ data and procedures - where here it’s individual data-sources (`Socket.Endpoint`s) that have identities, which are carried across different data, and finally used to combine in a typesafe way.

I would be interested to hear if anyone also has experience with related patterns, and for what? Tyxml is one example.

---

_[View the full topic](https://discuss.ocaml.org/t/blog-typesafe-complicated-combinations/16548)._
