ExtensionMethods

From APIDesign

Revision as of 06:07, 10 September 2025 by JaroslavTulach (Talk | contribs)
Jump to: navigation, search

A way to extend RootClass (or any other class) with functionality without disturbing others. Way better than DefaultMethods. Used in Kotlin. And also in Enso.

The basic idea is to avoid extending RootClass physically, but rather extend it virtually via a lexical compilation scope.

Personal tools
buy