Guarded Methods in OCaml

(xvw.lol)

28 points | by birdculture 4 days ago

1 comments

  • msdz 40 minutes ago
    Nice article, but I don’t fully understand why the author argues for such an aversion to static functions.

    > Moreover, it breaks the systematic approach of sending messages to an instance (often presented as one of the key arguments in favor of object-oriented programming).

    Is this just a matter of “the code will become spaghetti once too many classes/methods/implementations exist”? And, conversely, is a non-static method with a constrained, i.e. somehow different type (or also the approach of moving a method outside of the class proper) not more confusing?