ajvincent / es-membrane

An ECMAScript implementation of a Membrane, allowing users to dynamically hide, override, or extend objects in JavaScript with controlled effects on the original objects.
ISC License
109 stars 13 forks source link

show and tell: i made a membrane implementation #255

Open kumavis opened 1 year ago

kumavis commented 1 year ago

hi @ajvincent, met you on the ses call here's the membrane I made a long time ago https://github.com/lavamoat/cytoplasm i found it to be too slow for my needs, so i abandoned it. didnt try es-membrane for comparison

ajvincent commented 1 year ago

My first impression is it suffers from the same basic flaw that es-membrane suffers from: namely, that available technologies have evolved and our projects haven't kept up. See TypeScript, ECMAScript modules, Rollup.js... There's also ShadowRealms coming, and eventually Compartments, both of which will necessitate rewriting membranes anyway.

At least yours has classes. Mine doesn't, yet.

Honestly, src/index.js is a little hard to follow. This isn't necessarily your fault - membranes are complicated beasts no matter which way you slice them.

Your README cites six different membrane libraries - and I am glad you did, because I'd honestly forgotten about all but the observable-membrane one.

I think I'll keep this issue open for my reference.