Subject
- #Functional Coding
- #Framework
- #fp
- #Effect
- #Library
Created: 2024-07-30
Created: 2024-07-30 10:40
Functional coding has been quite trendy over the past few years.
While object-oriented programming provides structure,
functional coding has contributed to the conciseness of detailed code.
Of course, the popularity of functional coding tends to follow a cyclical pattern, recurring every few years.
Driven by this trend, various libraries have begun to emerge.
In my opinion, FxTswas simply a toolkit that utilized generators to create lazy evaluation.
lodash also gave off a strong toolkit vibe.
Of course, these toolkits do contribute to declarative programming.
However, the functional paradigm we were seeking was not about that; it was about mapping, correspondences, monads, and even more monads.
fp-ts was a perfect fit for that, and its maintainer was genuinely passionate about functional programming.
But a few months ago, I heard that this library had been merged into Effect.
So, I checked out Effect, and it was different.
While libraries can be readily adopted if their APIs are well-exposed, frameworks necessitate a deeper understanding of the underlying package.
This Effect instead of being wrapped in Observables like RxJs, utilizes Effect-wrapped objects that are passed around,
almost like the async keyword, spreading its influence.
To use Effect objects, the functions that utilize them also need to become Effect objects.
Similar to program in the code above.
While there are entry point functions available, they lack a certain appeal.
In any case, the structure and neatness of Effect in its role as a framework suggests the potential for a new wave and standard in the Node.js community, which I anticipate with excitement.
Comments0