proposal-flatMap
es1995
proposal-flatMap | es1995 | |
---|---|---|
2 | 10 | |
214 | 79 | |
- | - | |
0.0 | 0.0 | |
over 2 years ago | about 3 years ago | |
HTML | 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-flatMap
- SmooshGate
-
Pipeline Operator and Partial Application - Functional Programming in JavaScript
If you're doing a series of mutations specific to a custom type in that fashion, then there isn't much benefit. But imagine you want to chain operations on an existing type, whether it's a built-in like String, or a type introduced by a different package like sqlite.Database. To use method chaining you'd have to monkey-patch them, which can lead to all sorts of problems: colliding with other packages that want to monkey-patch the same types, confusing the reader when unfamiliar and seemingly undocumented methods appear (why does the SQLite documentation not mention this sqlite.Database#drop method? Which of my installed packages added that? ), your package breaking when the thing you're monkey-patching changes its API, altering object iterations, etc. The troubles with Prototype.js and MooTools in the '00s showed some of the headaches monkey-patching can lead to when it comes to JS especially, where users expect ever-changing browsers to work with 25-year-old code. (I still support changing flatten to smoosh, though.) You might subclass the existing type or encapsulate it in a new type, but then you're potentially breaking the user's typechecking, preventing the use of any other packages that want to do the same thing, escaping tree shaking, and becoming incompatible with unexpected types (what if the user already subclassed sqlite.Database themselves, and want to apply your transformation to that?).
es1995
- Design Principles Behind Smalltalk
-
No Lodash
> The API matters, and readability matters.
Exactly, lodash should be part of the language. https://github.com/mlajtos/es1995
-
[AskJS] Is JavaScript missing some built-in methods?
Yes, https://github.com/mlajtos/es1995
-
SmooshGate
> It made the decision to extend prototypes. In hindsight, a huge mistake.
I think it was a mistake at the time, but I still believe prototypal inheritance is pretty great idea. And JS desperately needs standard library, which IMO should extend built-in prototypes, so the language would be more coherent. ES1995 [0] was a funny take on this direction, but people (mainly non-JS people) would like to seriously use it. Go figure.
[0]: https://github.com/mlajtos/es1995
- ES1995: Javascript that could have been
-
Turboprop: JS Arrays as Property Accessors!?!
(I was trying out some old school way with ES1995. I might rewrite it to TS one day.)
-
[AskJS] TIL StackOverflow monkeypatches the String prototype across its various sites.
ES1995 agrees.
-
Function parameter as a tuple
Thanks! I think we share a few aesthetic ideals :) I really like your work on L1 and New Kind of Paper, and just noticed ES1995 – if only it was true…
- ES1995 – The Missing JavaScript Polyfill
- ES1995 – The Missing JS Polyfill
What are some alternatives?
proposal-set-methods - Proposal for new Set methods in JS
proposal-array-grouping - A proposal to make grouping of array items easier
banned - Banned from a site or organization? Account suspended? Censored? Why?
underscore - JavaScript's utility _ belt
type-system-j - adds an optional type system to J language
proposal-iterator-helpers - Methods for working with iterators in ECMAScript
proposal-iterator.range - A proposal for ECMAScript to add a built-in Iterator.range()
javascript-algorithms - 📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
L1 - L1: Tensor Studio — The playground for tensors
random-number-js - Generate random numbers with more variety.
ecma262 - Status, process, and documents for ECMA-262