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
Before rxjs used to uses chaining syntax (as elysia) but they changed to pipe syntax the reason they given was
Any library importing the patch operator augmenting the observable prototype would also augment it for all consumers. For example, when a library imports map extension from import 'rxjs/add/operators/map', it makes map available for all code importing the library itself. This could bring confusion due to the inconsistent way of importing extensions. Some places would not need to important map (those were the library is used) while in other place of the code we would have to else the compiler would complain. The other issue would be that if we did not import the extension and relied (intentionally or not) on the import of the library we consume, the day they remove the import, our application will break.
This point is more on the optimization side. Unused operators added on prototype can’t be removed during tree-shaking tools like webpack.
Operators patches imported but not used can’t be deleted by linters. https://kimsereyblog.blogspot.com/2018/11/moving-from-chaining-to-piping-in-rxjs.html
i thing pipe syntax has some good advantage
What is the feature you are proposing to solve the problem?
What is the problem this feature would solve?
Before rxjs used to uses chaining syntax (as elysia) but they changed to pipe syntax the reason they given was
Any library importing the patch operator augmenting the observable prototype would also augment it for all consumers. For example, when a library imports map extension from import 'rxjs/add/operators/map', it makes map available for all code importing the library itself. This could bring confusion due to the inconsistent way of importing extensions. Some places would not need to important map (those were the library is used) while in other place of the code we would have to else the compiler would complain. The other issue would be that if we did not import the extension and relied (intentionally or not) on the import of the library we consume, the day they remove the import, our application will break.
This point is more on the optimization side. Unused operators added on prototype can’t be removed during tree-shaking tools like webpack.
Operators patches imported but not used can’t be deleted by linters.
https://kimsereyblog.blogspot.com/2018/11/moving-from-chaining-to-piping-in-rxjs.html
i thing pipe syntax has some good advantage
What is the feature you are proposing to solve the problem?
I wrote a semi-working example of how would looks
i think it would help to make the project easier to maintain, extend etc
What alternatives have you considered?
No response
The text was updated successfully, but these errors were encountered: