Settings

Theme

Basic dependency injection in OCaml with objects

gr-im.github.io

22 points by nukifw 8 months ago · 3 comments

Reader

pdhborges 8 months ago

The author keeps aluding to the problem of loss of type inference without giving any example. I have no idea if the problem is relevant or not.

  • IsTom 8 months ago

    I think it's the part where he says you need additional separate module signature or to take two modules as parameters. With objects ocaml will infer object's signature for you and with modules you need to (directly or indirectly) pass it explicitely in arguments.

  • nukifwOP 8 months ago

    In the `show_content` example, using first class modules: `module H : ...`. The type need to be specified and since module composition is hard, it leads to very verbose solution

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection