# New Draft Tutorial on Polymorphic Variants

**URL:** <https://discuss.ocaml.org/t/new-draft-tutorial-on-polymorphic-variants/13485>\
**Category:** Learning\
**Tags:** ocamlorg, polymorphic-variants, learn-ocaml, tutorial, announce\
**Created:** [November 23, 2023, 12:58pm UTC](https://discuss.ocaml.org/t/new-draft-tutorial-on-polymorphic-variants/13485 "2023-11-23T12:58:46Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![cuihtlauac](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/cuihtlauac/32/3638_2.png) [@cuihtlauac](https://discuss.ocaml.org/u/cuihtlauac)\
**Post date:** [November 23, 2023, 12:58pm UTC](https://discuss.ocaml.org/t/new-draft-tutorial-on-polymorphic-variants/13485/1 "2023-11-23T12:58:46Z")

</div>

Dear OCamlers,

The [OCaml.org](http://OCaml.org) team continues working on new tutorials. We have a draft on polymorphic variants; we’d like your feedback on it:

- GH PR: [https://github.com/ocaml/ocaml.org/pull/1531](https://github.com/ocaml/ocaml.org/pull/1531)
- Online draft: [Polymorphic Variants · OCaml Documentation](https://staging.ocaml.org/docs/polymorphic-variants)

Previously [announced](https://discuss.ocaml.org/t/new-tutorials-on-basics-of-ocaml) [tutorials](https://discuss.ocaml.org/t/ann-new-get-started-documentation-on-ocaml-org) form a series.

1. [Installing OCaml](https://ocaml.org/docs/installing-ocaml)
2. [A Tour of OCaml](https://ocaml.org/docs/tour-of-ocaml)
3. [Your First OCaml Program](https://ocaml.org/docs/your-first-program)
4. [Values and Functions](https://ocaml.org/docs/values-and-functions)
5. [Basic Datatypes and Pattern Matching](https://ocaml.org/docs/basic-data-types)

But this one is not intended to follow right after it. It is designed to be taken by people familiar with OCaml’s basics and willing to master polymorphic variants.

As a draft, it has gaps, most notably:

- The section on Performance Drawbacks needs to be strengthened
- An example inspired by @garrigue “Code reuse through polymorphic variants” paper is missing

Share your feedback here or in GitHub, but do not use the “Contribute” link at the bottom of the staging page.

Hope it helps

EDIT - What’s the target audience?

This targets intermediate-level OCaml developers.

---

_[View the full topic](https://discuss.ocaml.org/t/new-draft-tutorial-on-polymorphic-variants/13485)._
