Why was Dart mentioned under the broadcast headline? I didn't quite get it.
Go Concurrency vs. RxJS
51–57 of 57 posts
Re: Go Concurrency vs. RxJS
#52The JS examples don't seem too demonstrative to me. Especially for someone not very familiar with RxJS. Any time you're wrapping something with `from` or `of`, I raise an eyebrow export function pipeline(in$: Observable ): Observable { return in$.pipe( mergeMap(product => from(product.Images)), ); } Why use mergeMap at all here? Why not not just return in$.pipe( map(product => product.Images), ); I get that this is a…
The latter pipeline would releases batches/arrays of images.
Re: Go Concurrency vs. RxJS
#53How can these even be compared? Go does concurrency on multiple CPU cores, and javascript one one. Go can so both IO and CPU bound tasks with the SAME way, and in javascript land you really dont do any CPU tasks async at all (makes no sense to do so).
Re: Go Concurrency vs. RxJS
#54I always found RxJS fairly awkward. I assumed it was a skill issue (and I still think it is), but gradually learned it for personal and professional projects. It's fine. I avoid it now. I think Go is orders of magnitude better in terms of general concurrency tooling, though I know some people straight up hate it. I've recently started using Effect, the TypeScript library, and I find it's so much better than RxJS as w…
Re: Go Concurrency vs. RxJS
#55Learning RxJS made me a better programmer faster than anything since the Gang of Four Design Patterns book 20 years ago.
What did you use it for, specifically? A personal project, or did you work on something that already used it heavily? I’ve played with it, and it’s interesting, but I haven’t quite found a reason to use it yet.
One simple example is a scroll tracker. I needed to track a user’s scroll, determine the direction, and combine it with touch events.
I wrote a prototype using event handlers and the code descended into incomprehensible spaghetti pretty quickly. With RxJS I was able to implement it as a series of custom operators that were easy to write, test, and use.
Re: Go Concurrency vs. RxJS
#56Re: Go Concurrency vs. RxJS
#57Earlier quoted context omitted.
My biggest issue with RxJS is that it is so easy, that you can easily make pretty bad bugs. In particular, you can have a `mergeMap` or a `switchMap`, and with RxJS they are very similar in API. But if you pick the wrong one, it can lead to weird bugs in your application. However, if you would manually program promises and maybe debounce helpers, you would be more likely to program the correct behavior. Still, the ea…
Haha, after all this time I still don’t find RxJS easy unless I’m using it for a common, familiar pattern. I agree otherwise, though. It’s definitely easy to create weird bugs.