proposal-deep-path-properties-for-record
Our great sponsors
proposal-operator-overloading | proposal-deep-path-properties-for-record | |
---|---|---|
9 | 3 | |
612 | 94 | |
1.3% | - | |
3.1 | 0.0 | |
4 months ago | almost 4 years ago | |
JavaScript | ||
MIT License | - |
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.
proposal-operator-overloading
-
I think Zig is hard but worth it
There's a not-very-active proposal to add operator overloading to JS which takes a similar scoped approach:
https://github.com/tc39/proposal-operator-overloading
-
Applying common operators (like +, *, -, /, etc.) to objects/arrays/lists?
There's a proposal to add operator overloading to the language, but AFAIK it never landed.
-
Immutability: what a monster...
An example of it would be the operator overloading proposal https://github.com/tc39/proposal-operator-overloading that would allow overriding === and it would also solve in one shot many other problems (like numeric types extension, pipeable operator, and all the ones listed in the proposal).
-
Is there a way to access native operations via class methods?
Kind of but not really. There is the concept of operator overloading that would let you specify how to handler uses of operators like - and + with your class instances, but this is not yet officially supported in JavaScript. There is an operator overloading proposal to maybe add it in the future (and if you're using QuickJS that has support built in), but right now there's not a whole lot you can do.
- Proposed Operator Overloading in JavaScript
-
Extending Built-ins with ES6 Classes
Though this is not possible now since operators always work on primitive values, there is a proposal for operator overloading that could potentially allow us to use operators on objects in the future. It's still very early, so its not something you can use today (or anytime soon, if ever at all). In the meantime, you'll need to use method calls to perform these kinds of operations.
-
[AskJS] Why does our community hate Operator Overloading?
I'm not sure who hates it, but I have seen it abused (which people don't like). But, quickjs has it now, and there's a proposal to have it added to the JS spec. The proposal is only stage 1, so who knows what will happen with it or when, but its not counted out.
-
ES2022 feature: class static initialization blocks
https://github.com/tc39/proposal-operator-overloading
There are still a couple issues that have to be solved. m2c: I hope that won't get to stage 3, though I like operator overloading in general, I think it's something that will complicate JS even more.
- TC39 proposal: operator overloading in JavaScript
proposal-deep-path-properties-for-record
-
ES2022 feature: class static initialization blocks
Oh, I like that a lot, especially as they've proposed a new JSON.parseImmutable() method as well. The syntax is surprisingly simple (and obvious!) and deep equality and simple comparisons is perfect.
Deep paths look interesting on top of this, the idea is one I like but not sold on it being implementable in any sort of non-clunky way.
https://github.com/tc39/proposal-deep-path-properties-for-re...
-
JavaScript Records and Tuples Proposal is in ECMAScript stage 2
The proposal for that is here: https://github.com/tc39/proposal-deep-path-properties-for-record.
-
ECMAScript Proposals I am excited about
Records & Tuples + Deep path properties for Records + Pattern matching + Do-expressions
What are some alternatives?
ohm - A library and language for building parsers, interpreters, compilers, etc.
proposal-class-fields - Orthogonally-informed combination of public and private fields proposals
match-iz - A tiny pattern-matching library in the style of the TC39 proposal.
play - The easiest way to start coding games and graphics projects in Python
quickjs - Public repository of the QuickJS Javascript Engine.
proposal-class-static-block - ECMAScript class static initialization blocks
proposal-pattern-matching - Pattern matching syntax for ECMAScript
proposal-decorators - Decorators for ES6 classes
proposal-deep-path-properties-for-re