Skip to main content
2 votes
Accepted

Is changing the signature of a callback a breaking change?

It depends on how the call of the callback changes! Lets say in V1.0.0 of a library or component where op resides, the function looks like this: function op(target, callback) { // ... ...
Doc Brown's user avatar
  • 212k
2 votes

How can I write more optimal code keeping Javascript "shapes"/"hidden classes" in mind?

Don't write JavaScript to leverage runtime optimizations. Once you legitimately need to entertain runtime-level optimizations to solve a performance problem, it is time to seriously consider whether ...
Greg Burghardt's user avatar
1 vote

How can I write more optimal code keeping Javascript "shapes"/"hidden classes" in mind?

I found this post : https://romgrk.com/posts/optimizing-javascript/ Which lists a bunch of interesting optimisations for javascripters in 2024. The best thing is it includes benchmarks for each! "...
Ewan's user avatar
  • 78.6k
1 vote

Is changing the signature of a callback a breaking change?

Question 1: Does my code compile and run after I switch to the changed library? Question 2: Does my unmodified code run without any change in its behaviour? If the answer is “Yes” twice then it is a ...
gnasher729's user avatar
  • 46.7k
1 vote

Is changing the signature of a callback a breaking change?

I'm sidestepping the specific example because I feel it's inefficient to try and define breaking changes on a case by case basis. The definition of a breaking change, at its very core, is this: If ...
Flater's user avatar
  • 54.9k

Only top scored, non community-wiki answers of a minimum length are eligible