JaroslavTulach at 06:10, 10 September 2025 - 2025-09-10 06:10:43

←Older revision Revision as of 06:10, 10 September 2025
Line 2: Line 2:
The basic idea is to avoid extending [[RootClass]] ''physically'', but rather extend it ''virtually'' via a lexical compilation scope.
The basic idea is to avoid extending [[RootClass]] ''physically'', but rather extend it ''virtually'' via a lexical compilation scope.
 +
 +
See [[wikipedia:Extension_method]] explanation which may agree or contradict my view.

JaroslavTulach at 06:07, 10 September 2025 - 2025-09-10 06:07:14

←Older revision Revision as of 06:07, 10 September 2025
Line 1: Line 1:
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]].
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.

JaroslavTulach: New page: 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. - 2025-09-10 06:04:26

New page: 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.

New page

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]].