#+title: object-oriented programming #+roam_alias: "OOP" There are, broadly speaking, two kinds of object-oriented programming: 1. [[file:20210521132503-smalltalk.org][Smalltalk]]-like, which is similar to the [[file:20210311213119-actor_model.org][actor model]]. 2. [[file:20210521132658-java.org][Java]]-like, which has more to do with [[file:20210521132709-inheritence.org][inheritence]] hierarchies. The contents of this page will mostly have to do with the latter. See the "actor model" page for Smalltalk-like OOP. The holy trinity of OOP languages are [[file:20210521211446-c.org][C++]], [[file:20210521132658-java.org][Java]], and [[file:20210521211455-c.org][C#]]. OOP languages proper are characterized by framing every aspect of the program as a [[file:20210521211550-class_programming.org][class]]. In [[file:20210521132658-java.org][Java]], there is a special class which must have a static method called main. Java and C#, until recently, did not allow for [[file:20210521211631-free_function.org][free function]]s.