Guarded Methods in OCaml

28 points - last Monday at 4:15 PM

Source

Comments

msdz today at 9:29 PM
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?