News for hackers. Stuff that matters.
Re:Public and private class fields by BillinghamJ on Sunday December 16, 2018 @06:49AM (#18692718)
Bear in mind, in the cases you refer to, the inner functions should only be allocated once - when the file is loaded.

The issue is when you use this pattern for initialising what are effectively classes. Then every time you use `new`, the functions have to be wrapped again.

Re:Public and private class fields by fsnarskiy on Thursday December 20, 2018 @08:39PM (#18730838)
Again you are saying the "inner functions should only be allocated once", there is no rule or book in CS that states that as the absolute truth. It is however a concept that would be taught in a typical OO programming class.

Idk where exactly you were taught this, or if you did not read my whole speil about that being memory/cpu tradeoff.

i know i put up a wall of text, but if u have time to read one article on JS from all of this it is this article - https://medium.com/javascript-scene/common-misconceptions-ab...