From f41c4724534908170a7d9c99734620d2a669ece8 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 12 Jun 2023 10:58:05 +0300 Subject: [PATCH] advanced topics... Signed-off-by: Alex A. Naanou --- js-types-n-oop.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/js-types-n-oop.js b/js-types-n-oop.js index 5ed177d..c59d78b 100755 --- a/js-types-n-oop.js +++ b/js-types-n-oop.js @@ -173,6 +173,21 @@ // Extending builtin types // +// Mixing builtin types +// +// In general this is impossible in JavaScript due to the lack of any +// mechanism of horizontal name resolution in the inheritance chain like +// multiple inheritance (hence why we call it a chain and not a tree). +// +// So there is no way, for example, to make something both an array and +// a function at the same time. +// + + + + + + // XXX Reflect.construct(Function, args, newConstructor) // mainly usefull if the resulting instance has to be of a builtin // type like a function (callable) or an array...