You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context:@bmakuh and I have been talking about this privately for some time. This library will not—repeat, will not—be going anywhere. This proposal would be a parallel in addition to True Myth proper, not a new version of this library.
There are two major language features which have already landed in JavaScript and one which looks likely to land in the next year or so.
Already landed: the ?. and ?? operators
Likely to land: the |> operator
There are also some performance concerns in sufficiently large apps, where memory pressure starts to be a problem, with the current implementation of Maybe in particular. (Nearly everything that follows is Maybe specific, because there's no way to make these kinds of simplifications for Result, unfortunately.) It would be extremely useful in these contexts for there to be a functional-only approach which lets ?. and ?? do some of the work we have historically needed tools like Maybe for, in combination with combinators for transforms.
What should they be? What would a minimal, extremely high-performance Maybe implementation look like given the new language features? Can we/should we assume |> lands at some point?
This discussion was converted from issue #55 on December 14, 2020 19:19.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Context: @bmakuh and I have been talking about this privately for some time. This library will not—repeat, will not—be going anywhere. This proposal would be a parallel in addition to True Myth proper, not a new version of this library.
There are two major language features which have already landed in JavaScript and one which looks likely to land in the next year or so.
?.
and??
operators|>
operatorThere are also some performance concerns in sufficiently large apps, where memory pressure starts to be a problem, with the current implementation of
Maybe
in particular. (Nearly everything that follows isMaybe
specific, because there's no way to make these kinds of simplifications for Result, unfortunately.) It would be extremely useful in these contexts for there to be a functional-only approach which lets?.
and??
do some of the work we have historically needed tools likeMaybe
for, in combination with combinators for transforms.What should they be? What would a minimal, extremely high-performance
Maybe
implementation look like given the new language features? Can we/should we assume|>
lands at some point?Beta Was this translation helpful? Give feedback.
All reactions