ajvincent / composite-collection Goto Github PK
View Code? Open in Web Editor NEWComposing Maps, WeakMaps, Sets and WeakSets into compiled classes
License: Mozilla Public License 2.0
Composing Maps, WeakMaps, Sets and WeakSets into compiled classes
License: Mozilla Public License 2.0
This will be required for #7.
Also an optional "The configuration for this file is at ..."
Template strings are an easier way to go, if messier.
... which is a hairy problem in and of itself.
sverweij/dependency-cruiser#336 is the closest I could find to what I need, more complex than eslint but not designed for unit tests.
Example: KeyHasher must store non-primitive keys weakly. Truly verifying that would require analysis of an abstract syntax tree (AST), trying to trace an entry point (an argument in one function) to points that assign or store a value. I could see that requiring a few things, of which I only know I need the first three:
this
and/or stack traces, the automaton might need to become a "push-down automaton", which is just lovely for the added complexity.Crafting this would be ugly, but the composite collections I'm building could make it easier, ironically enough.
Honestly, the complexity of this type of analysis could result in a complementary project, where each one uses the other as a development dependency...
Otherwise, it leaks memory for holding a bunch of WeakSets or WeakMaps.
I created the eslint branch, but this requires eslint to support private class fields - which it won't until after ECMAScript 2022 goes official in June 2022. I could make it work by using @babel/eslint-parser
, but I think that locks me in with much pain trying to convert from one engine to another for future work.
Why should people have interest in this project?
if (!this.has(args))
this.set(args, defaultValue);
return this.get(args)
With the number of arguments and work we have to do, providing a built-in method for this is probably a good idea.
spec/integration/combinations.mjs
should:
This should produce 16 unique classes.
For good measure, I can also include combinations classes for 3 levels of map keys (8) and 3 levels of set keys (8).
In particular, we can't let an argument validator lambda function explicitly throw.
This will make one-to-one hashtables possible.
In particular, if an add or set operation fails, throw an exception. This makes it clear something went wrong.
Bootstrapping! https://en.wikipedia.org/wiki/Bootstrapping_(compilers)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.