Live data from Hacker News

jQuery 3.0 Released

jquery.com

131–140 of 164 posts

Re: jQuery 3.0 Released

#131
post #77

I would suggest the release notes are a better link target: http://blog.jquery.com/2016/06/09/jquery-3-0-final-released/ Developers can figure out how to download it if they are interested.

> "We set out to create a slimmer, faster version of jQuery (with backwards compatibility in mind)."

Wait, isn't the whole point of a major version bump that it breaks backwards compatibility?

Later on it says there are a few breaking changes, but not many apparently. Which in general is a good thing, but focusing on keeping compatibility through a major version bump seems silly.

Re: jQuery 3.0 Released

#132
post #116

Earlier quoted context omitted.

> return service.fetchData().then((data) => {}).catch((err) => {console.log(err); throw err;}); Yes - but this kind of code requires that you know that something else chains the promise and handles 'err' - which is my entire complaint, a higher level function shouldn't need to know whether it has children or if they do error handling. Otherwise it's back to the same kind of callback style where you have to go into an…

It doesn't need to care whether someone else is handling it. It should just do what it needs to do according to its contract. The caller that receives the promise as a result has its own contract that may or may not involve handling the error as well (and so on up the chain). You generally have to have an end-of-the-chain catch as a safety precaution. If you don't have one and the promise fails you may get no feedbac…

«You generally have to have an end-of-the-chain catch as a safety precaution. If you don't have one and the promise fails you may get no feedback that an error happened at all.»

This will be increasingly less of a need as browser native promises catch up (and more reason to make sure that the promise library you are using is built on top of native promises rather than rolled from scratch). Several browser dev consoles will already show unhandled promise rejections today, and there's a growing convergence to also providing browser/system-wide event handlers for unhandled rejections as well.

http://www.2ality.com/2016/04/unhandled-rejections.html

Re: jQuery 3.0 Released

#133
post #97
post #32

Earlier quoted context omitted.

Well it's 2016 and we still don't have nodeList.forEach() so it can't be much worse.

Actually, we do, since Chromium 51. See https://dev.opera.com/blog/opera-38/

Yeah you're right. Just updated stable Chrome and:

  NodeList.prototype.forEach
  forEach() { [native code] }
Thank. God. Finally.

Edit:

  HTMLCollection.prototype.forEach
(which is what you'll get from other vanilla JS methods) is still missing.

Re: jQuery 3.0 Released

#134
post #90

Earlier quoted context omitted.

Alias `document.querySelectorAll` to `$$`?

var $ = selector => [].slice.call(document.querySelectorAll(selector)); Fo' sizzle

Or just polyfill it with NodeList.prototype.forEach = Array.prototype.forEach and get nice readable code.

Point is: we shouldn't have to.

Vanilla JS also allowed you to look inside HTML5 FormData a few months earlier. And no, it isn't FormData.toString().

Re: jQuery 3.0 Released

#135
post #131
post #77

I would suggest the release notes are a better link target: http://blog.jquery.com/2016/06/09/jquery-3-0-final-released/ Developers can figure out how to download it if they are interested.

> "We set out to create a slimmer, faster version of jQuery (with backwards compatibility in mind)." Wait, isn't the whole point of a major version bump that it breaks backwards compatibility? Later on it says there are a few breaking changes, but not many apparently. Which in general is a good thing, but focusing on keeping compatibility through a major version bump seems silly.

It's not that silly. Yes, a major version bump allows you to break backwards compatibility in some ways. But if the break is too severe you run the risk of preventing a large percentage of the user base from upgrading. So it's still a good idea to carefully consider exactly where to introduce breaking changes and to try and keep the burden of upgrading proportional to the benefits offered by the upgrade.

Re: jQuery 3.0 Released

#136
post #131
post #77

I would suggest the release notes are a better link target: http://blog.jquery.com/2016/06/09/jquery-3-0-final-released/ Developers can figure out how to download it if they are interested.

> "We set out to create a slimmer, faster version of jQuery (with backwards compatibility in mind)." Wait, isn't the whole point of a major version bump that it breaks backwards compatibility? Later on it says there are a few breaking changes, but not many apparently. Which in general is a good thing, but focusing on keeping compatibility through a major version bump seems silly.

> Yes, there are a few “breaking changes” that justified the major version bump, but we’re hopeful the breakage doesn’t actually affect that many people.

BC is "desirable", not "required", if breaking compatibility makes sense to develop a major improvement, then do it.

Re: jQuery 3.0 Released

#137
post #131
post #77

I would suggest the release notes are a better link target: http://blog.jquery.com/2016/06/09/jquery-3-0-final-released/ Developers can figure out how to download it if they are interested.

> "We set out to create a slimmer, faster version of jQuery (with backwards compatibility in mind)." Wait, isn't the whole point of a major version bump that it breaks backwards compatibility? Later on it says there are a few breaking changes, but not many apparently. Which in general is a good thing, but focusing on keeping compatibility through a major version bump seems silly.

> focusing on keeping compatibility through a major version bump seems silly.

I'd offer the Python 3 fiasco as a counterexample.

Re: jQuery 3.0 Released

#138
Theres a few things that I want from the next x.0 release. Until these get done, jQuery will look like a library that doesnt know what it wants to be but used to serve a purpose.

- removal of animation from core

- removal of styling from core

- Create a jQuery 'fx' library seperate from jQuery

- have a standardized serialized / deserialize for forms

- Ability to handle multipart forms in ajax post requests

Re: jQuery 3.0 Released

#140
post #131
post #77

I would suggest the release notes are a better link target: http://blog.jquery.com/2016/06/09/jquery-3-0-final-released/ Developers can figure out how to download it if they are interested.

> "We set out to create a slimmer, faster version of jQuery (with backwards compatibility in mind)." Wait, isn't the whole point of a major version bump that it breaks backwards compatibility? Later on it says there are a few breaking changes, but not many apparently. Which in general is a good thing, but focusing on keeping compatibility through a major version bump seems silly.

Backwards compatibility is still quite important in major version releases. Just look at Angular 1 to 2, Rails 2.3 to 3, and Python 2 to 3 to see examples of this.
Post reply on HN