# \#oop

**URL:** https://discuss.ocaml.org/tag/oop/244.md

[Latest](https://discuss.ocaml.org/latest.md) · [Categories](https://discuss.ocaml.org/categories.md) · [Tags](https://discuss.ocaml.org/tags.md)

---

## [Actual Performance Costs of OOP Objects](https://discuss.ocaml.org/t/actual-performance-costs-of-oop-objects/9400)

<div class="topic-metadata">

**Author:** [@bluddy](https://discuss.ocaml.org/u/bluddy)\
**Replies:** 56\
**Last updated:** [October 3, 2024, 10:11am UTC](https://discuss.ocaml.org/t/actual-performance-costs-of-oop-objects/9400 "2024-10-03T10:11:23Z")

</div>

I’d like to understand what the actual performance implications are of OCaml objects. Everyone likes to denigrate them, but what are their performance characteristics really like (and why)?

---

## [\`self\` use case?](https://discuss.ocaml.org/t/self-use-case/11774)

<div class="topic-metadata">

**Author:** [@anzhi0708](https://discuss.ocaml.org/u/anzhi0708)\
**Replies:** 4\
**Last updated:** [March 24, 2023, 2:37pm UTC](https://discuss.ocaml.org/t/self-use-case/11774 "2023-03-24T14:37:12Z")

</div>

Hello! Documentation says ...In fact this names the object, allowing you to call methods in the same class or pass the object to functions outside the class. In other words, it's exactly the same as this in C++/Java. ..…

---

## [Why my subclass(inheritance) cannot be passed to a function requiring its super class?](https://discuss.ocaml.org/t/why-my-subclass-inheritance-cannot-be-passed-to-a-function-requiring-its-super-class/9092)

<div class="topic-metadata">

**Author:** [@trying](https://discuss.ocaml.org/u/trying)\
**Replies:** 2\
**Last updated:** [January 3, 2022, 12:31pm UTC](https://discuss.ocaml.org/t/why-my-subclass-inheritance-cannot-be-passed-to-a-function-requiring-its-super-class/9092 "2022-01-03T12:31:27Z")

</div>

Hi, I am playing with the OOP part of OCaml and I tried to implement a simple command pattern (which I am aware not ideal for OCaml, but just for fun here) I defined a class with method execute and let a frenchEvent to …

---

## [Objects use cases in OCaml](https://discuss.ocaml.org/t/objects-use-cases-in-ocaml/2282)

<div class="topic-metadata">

**Author:** [@egoholic](https://discuss.ocaml.org/u/egoholic)\
**Replies:** 38\
**Last updated:** [June 19, 2019, 6:43am UTC](https://discuss.ocaml.org/t/objects-use-cases-in-ocaml/2282 "2019-06-19T06:43:17Z")

</div>

Typical OCaml developer prefers not to use OO-features, but sometimes choosing objects over other composable “granules” is the simplest solution. Could you please share your own experience when objects is a MUST or a bes…
