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
Hey @gabejohnson, thanks for opening this. I've been watching fantasyland/fantasy-land#286 closely. It'd currently be much simpler for @most/core to implement static-land (it mostly already does, but of is named now) than fantasy-land 3.x, since @most/core streams don't share a common prototype (they only share an interface).
I've toyed around with two approaches integrating Fantasyland support. Both are backwards compatible. I guess, I'd favour the separate package approach (A), since it's not invasive.
Benefits of not going for an add-on
TypeScript throughout, (i.e. without importing compiled code)
just a single compile-to-JS step
Approach A) Provide a FL flavoured API in @most/core-fl by wrappingStream with class FantasyLandStream <A>
provide a FL<A> Stream class which delegates FL method calls to @most/core functions. See discussion and playground code
using the wrapper function, export each @most/core function as FL-flavoured API
Activity
briancavalier commentedon May 18, 2018
Hey @gabejohnson, thanks for opening this. I've been watching fantasyland/fantasy-land#286 closely. It'd currently be much simpler for
@most/coreto implement static-land (it mostly already does, butofis namednow) than fantasy-land 3.x, since@most/corestreams don't share a common prototype (they only share an interface).Hence my interest in fantasyland/fantasy-land#286. We'll continue keeping an eye on it.
Frikki commentedon Oct 7, 2020
And this fantasyland/fantasy-land#315
semmel commentedon Feb 12, 2024
I've toyed around with two approaches integrating Fantasyland support. Both are backwards compatible. I guess, I'd favour the separate package approach (A), since it's not invasive.
Benefits of not going for an add-on
Approach A) Provide a FL flavoured API in @most/core-fl by wrapping
Streamwithclass FantasyLandStream <A>FL<A>Stream class which delegates FL method calls to @most/core functions. See discussion and playground codeStrawman PR
Approach B) Add FL support to @most/core by replacing
Stream<A>withclass FL<A> implements Stream<A>map,empty,…) into a single sourceFL.ts(must be a single file to avoid circular dependencies)Stream<A>withFL<A>Stream<A>implementationsextends Stream<A>withimplements FL<A>super()call