From e92cab865981dcc56ba494005390ff5062dfc7f7 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sun, 26 Apr 2020 21:32:13 +0300 Subject: [PATCH] updated docs... Signed-off-by: Alex A. Naanou --- README.md | 9 ++++++--- object.js | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b988487..ea76779 100755 --- a/README.md +++ b/README.md @@ -168,8 +168,11 @@ take care of both the _function constructor_ and `prototype.__call__(..)` handling. **Notes:** -- this now is an instance method, in the future this may (or may not) -move to being a class method... +- `.__new__(..)` is an instance method, contrary to _Python_ that served + as an inspiration for this protocol. This is done intentionally as in + JavaScript there is no distinction between an instance and a class and + defining `.__new__(..)` in the class would both add complexity as well + as restrict the use-cases for the constructor. ## Components @@ -202,7 +205,7 @@ mixinFlat(, , ...) This is like `Object.assign(..)` but copies property objects rather than property values. -Make a raw instance +Make a raw (un-initialized) instance ``` makeRawInstance(, , ...) -> diff --git a/object.js b/object.js index 734d942..ffc1484 100755 --- a/object.js +++ b/object.js @@ -3,6 +3,7 @@ * * * XXX should this extend Object??? +* ...if yes then it would also be logical to move Object.run(..) here * **********************************************************************/ ((typeof define)[0]=='u'?function(f){module.exports=f(require)}:define)(