arangojs
proposal-private-fields
arangojs | proposal-private-fields | |
---|---|---|
2 | 7 | |
593 | 320 | |
0.2% | - | |
8.5 | 0.0 | |
19 days ago | over 2 years ago | |
TypeScript | HTML | |
Apache License 2.0 | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
arangojs
-
All JavaScript and TypeScript features of the last 3 years explained
We actually did the same for ArangoDB (I think we first did this in 2015, I remember being surprised nobody had done something similar for SQL at the time). Here's the JS driver's current implementation of it:
https://github.com/arangodb/arangojs/blob/main/src/aql.ts#L1...
Basically the `aql` template tag returns an object that can also be fed back into it and we also deduplicate arguments to avoid sending redundant data over the wire. There's also an escape hatch via a helper function (`aql.literal`) in cases where you need to insert literals that aren't known at compile time (e.g. you load query filters from a configuration file).
-
what databases will prisma support next?
Their official Typescript client is well maintained and quite powerful, it would be very useful in an eventual integration with Prisma.
proposal-private-fields
- What do you mean by “encapsulation” / “hard private”?
-
All JavaScript and TypeScript features of the last 3 years explained
> - # private... not sure why they didn't just use the "private" keyword, but I don't care. I almost always use TypeScript anyways
One of the reasons was to allow private and public fields of the same name, so that subclasses are free to add own public fields without accidentally discovering private fields. There were many more considerations that went into the design: https://github.com/tc39/proposal-class-fields/blob/main/PRIV....
There was a heated debate about this and the choice of the # sigil back in 2015 at the time private fields were being designed: https://github.com/tc39/proposal-private-fields/issues/14.
-
why java developers always hate Node/javascript? why they don't face the truth that javascript now is not javascript year 1995?
The inability to correctly polyfill this, which still keeping the variables private, was a subject of debate in TC39. One of the explicit advantages of moving to a "soft private" model (as discussed here: https://github.com/tc39/proposal-private-fields/issues/33) was that it could be polyfilled correctly.
- Is TypeScript inevitable future of webdev or will it die out some day?
-
Do decorators have a future?
There was a long and thoughtful article explaining why the private keyword was not enough; but now I can't find it :-( Here's the best replacement I could find: https://github.com/tc39/proposal-private-fields/issues/14 Effectively, what they are saying, is that you need to be able, within a class method, to disambiguate whether you are dealing with a private field of an identically named public field, and the keyword doesn't help with this.
-
Implementing Private Fields for JavaScript
This is all covered here:
https://github.com/tc39/proposal-private-fields/blob/master/...
-
Implementing Private Fields for JavaScript – Mozilla Hacks - the Web developer blog
As well, the Issues section of that proposal repo, as well as the Issues section of the original Private Fields repo (before it was merged with the Class Fields proposal) contain lots of discussion about this topic.
What are some alternatives?
typeorm - TypeORM module for Nest framework (node.js) 🍇
proposal-class-fields - Orthogonally-informed combination of public and private fields proposals
Prisma - Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB
dndb - A Deno 🦕 persistent, embeddable and optimized NoSQL database for JS & TS
nodejs-datastore - Node.js client for Google Cloud Datastore: a highly-scalable NoSQL database for your web and mobile applications.
prisma1 - 💾 Database Tools incl. ORM, Migrations and Admin UI (Postgres, MySQL & MongoDB) [deprecated]
DataStax Node.js Driver for Apache Cassandra - DataStax Node.js Driver for Apache Cassandra
RxDB - A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/