I recently saw an answer to a JavaScript question where the answer used Array#filter
without mentioning that it's a new feature of JavaScript as of ECMAScript 5th edition (aka ES5), so I commented that it would be worth mentioning that.
I got a reply from the person posting the answer that they thought not saying anything about it is "not an issue at all." I got a stronger reply from a second commenter saying "When can we stop putting a disclaimer...on every single answer that uses ES5?" The second commenter later called it "noise" and "messy," whereas to me it's a disservice to the questioner to leave this trap for them to fall into.
What's your take?
There are probably at least four answers to this question:
- Always warn them when you use ES5 features.
- Warn them when you use ES5 features if they seem somewhat like newbies.
- Warn them when you use ES5 features that cannot be emulated by es5-shim.js and similar.
- Never warn them.