Echo JS 0.11.0

<~>

MaxArt comments

MaxArt 3119 days ago. link 1 point
It's not like one excludes the other, as they have different purposes. Promises are good for one-time events, while observables are meant for streams of events. It becomes problematic when we try to bend one to do the job of the other.

For example, right now we have a nice `fetch` API that *seems* to be perfect for promises (we've been using them since jQuery implemented `done` and `fail`), but now we've not only lost the ability to cancel a request, but also to watch for the progress in uploading the request and downloading the response.

You wouldn't use a Promise to listen to a click event, either.

Conversely, using observables for simple tasks (for example, getting a Blob out of a <canvas>) introduces unnecessary syntactic clutter.

The problem now is that we have native Promises, but still no native Observables.
MaxArt 3120 days ago. link 4 points
Sad news, but cancelable promises have always been on a problematic path. To be honest, the whole "promise" thing, while having some undeniable advantages, has some quirks that prevent a really good coding experience.

The inability to cancel a promise with a meaningful outcome is one of those things. We adopted promises and build a whole new syntax (async/await) around it, without thinking about future developments.

The fact is that promises are meant to be a simple tool to organize our code flow, and yet under - and even over - the hood they're not.

We'll have to wait for Observables to solve out control flow problems (hopefully). They're not simple, but at least they don't pretend to be.

Anyway, thank you Domenic Denicola for your effort. I don't think it's been in vain, for the whole community.
MaxArt 3124 days ago. link 1 point
I'll tell you what: we still have to wait several months to use it reliably, because it's only available in TP. Because Safari still has an old-school update cycle, when even Microsoft has learnt the lesson.
MaxArt 3125 days ago. link 1 point
Well, a bit, yes. Sometimes you get thrown off by some mistake that in the best case makes you stutter and distracts you, and in the worst it makes you misunderstand the meaning. As chris-l pointed out, the title itself suffers from this problem, as it sounds like you think *closures* are wrong!

I bet that's why you got 4 downvotes here, even though your article has good points.

As a non-native English speaker myself - and coming from a Romance language, too - I understand the difficulties of being fluent in English, as that's something that could be achieved with a lot of practice. Just like any other language, after all.

You write in English to make your content accessible to an international public, so it's better to get some proofreading help until you're confident to do that on your own.
MaxArt 3126 days ago. link 1 point
Wave was a disaster in terms of presentation :) and now it's dead. The products I mentioned still exist.
MaxArt 3126 days ago. link 2 points
I'm not sure if you actually meant they're "wrong" when in your post you mainly rant about how they're often wrongly explained - which could be generally agreeable.

But surely they don't feel anything like "miraculous" once you grasp the basic concepts - and you have them right in example 2. Why should example 3 feel different?

You should also mention - in 2016 - that using `let` instead of `var` in the last example completely changes the outcome.

On a side note, take care of your English grammar.
MaxArt 3126 days ago. link 3 points
It's a demo - let us decide if it's cool or not.
MaxArt 3127 days ago. link 1 point
I'm honestly intrigued by the reasons of those who downvoted the article. It looks like a generally agreeable opinion to me, but maybe I'm missing some points of view.

Is there someone who voted down that can explain the reasons?
MaxArt 3129 days ago. link 2 points
Babel isn't what it used to be, i.e. a tool to transpile code. Now it's a framework that offers the code's AST to plugins for transformations.
It could be transpilation, but extensively it could be as simple as comment removal or minification. So yes, Babel still does *one* thing, but so does every Babel plugin.
MaxArt 3133 days ago. link 2 points
I'm shaking my head here. You're missing the point.

The article is about non-costructive criticism, towards every software in general, but specifically OSS. There are people that do that on their spare time and don't get a dime for that. They keep on thanks to the moral support and active contribution of the community.

Even if you're somewhat "forced" to use Angular (you can always leave your job for greener pastures anyway - it's not like a good developer usually has a hard time finding a new position), you have to keep in mind that it's a framework that got and still gets a huge amount of work done. You should respect that and the choice of a lot of people that based their work on Angular and, overall, the efforts of all those who contributed.

There are a lot of reasons behind every choice that's ever made, and only because you're not seeing them you shouldn't dismiss them with something like "Pah! It's just MARKETING!"

Yes, Google pushed Angular a lot. But it's not like everything that Google pushed got the same amount of success, like Dart, or Chrome OS, or Google+. It had this success because a giant like Google is *committed* to the project, granting the mid-to-long term support which is needed in the business.

It also had its success because Angular has undeniable advantages, like being a complete framework for web applications, easily allowing things like dependency inversion and unit/e2e testing, and promoting good SOLID concepts.

In the end, ranting and bashing might relieve your spirit for a moment, but it doesn't get your job done and doesn't help solving your problems either. We're lucky enough to have a vast and responsive community around, so we can always rely on it if we pose ouselves in the right way.
[more]