Quantum / Multicore Constructs

# Michelle Antonello (7 years ago)

How well does JavaScript model constructs in Graph theory ?

obj = { [0,1,2,3]:1 }

Also, I would like

Object.prototype.parent Object.prototype.forEachOwnProperty Object.prototype.trace Object.prototype.traceModules (emits source) Object.prototype.toArray Array.prototype.iterate = { (iterator function_) } Entity() (A lightweight Object superclass w/o an *.prototyp property) Even more powerful regular expressions !!!

I monitor progress in mathematics and physics (eg. Black holes accurately modeled by tensors == Array.prototype construct; Discovery of Higgs particle as sole mass carrier == Object baseclass along with its extensible prototypes)

Michelle Antonello Abdul S.

# Michael Theriot (7 years ago)

(FYI this was tagged spam by Gmail for failing email auth)

You can't do that, but this will probably achieve what you wanted.

var obj = Object.assign({}, new Array(4).fill(1));

I think a few of these already exist under a different name.

Object.prototype.parent -> Object.prototype.constructor

Object.prototype.toArray -> [...Object]

Array.prototype.iterate -> Array.prototype[Symbol.iterator]

Entity() -> Object.create(null)

# Jordan Harband (7 years ago)

There's no Object.prototype.toArray, nor can you spread an object, because it's not an iterable - but you can use Object.keys/entries/values, and iterate over that array.