Message from JavaScript discussions
June 2017
— Correct
I actually don't usually use typical constructors with new
and the prototype chain, but rather factories which can do the same chaining while supporting that.
— Then, using the revealing module pattern, I also avoid duplicating functions. So this is one unusual instance where I tried to use regular "classes"
— I can easily supply constructor thunks though, as part of the revealed interface, which is what I usually do when revealing modules
— If so you can allow prototype methods to access the same private members through weakmap
— Hm, TRGWII I went to implement using charcodes in that stringset and ran into some... interesting roadblock
— Since the point is to use integers, and even moreso to use a pre-allocated typed array (char code 80 is index 80 etc...) that conflicts, or rather presents a challenge, when you increase precision to more than one character
— Since each char code can be between integers 0
through 65535
, to represent more than one can be an interesting problem
— How?
— Just nested arrays of size 65535?
— Well for one, the array indices can't represent more than one
— Yes, but wow!